Campbell Barton
fbe13ab84a
style cleanup
2012-09-20 12:29:28 +00:00
Campbell Barton
b0c7c8756f
code cleanup: cycles now uses system includes for boost/oiio.. etc, so we dont get warnings from system headers.
2012-09-20 09:04:43 +00:00
Lukas Toenne
acb2c7e0d1
OSL Fix for fireflies in velvet bsdf, ported over from SVM fix in r41738.
2012-09-16 13:17:39 +00:00
Lukas Toenne
21964e6538
OSL implementation of RGB ramp node.
...
The sampled color ramp data is passed to OSL as a color array. This has to be done as actual float[3] array though, since the Cycles float3 type actually contains 4 floats, leading to shifting color components in the array.
Additional parameter set functions for arrays have been added to the Cycles OSL interface for this purpose.
2012-09-15 15:41:37 +00:00
Thomas Dinges
b6fd8ae97a
Cycles / OSL:
...
* Fix Musgrave Texture, used wrong Perlin Noise (0..1) instead of -1..1. Also added comment to noise_basis() to make it clear which noise type is used there.
2012-09-15 15:03:43 +00:00
Thomas Dinges
a55d13bb9e
Cycles / OSL:
...
* Fixes for Voronoi, Gradient and Magic Textures. SVM and OSL renders excactly the same now.
2012-09-15 13:56:09 +00:00
Campbell Barton
a425790065
style cleanup
2012-09-14 23:11:47 +00:00
Lukas Toenne
c4de45e56b
Implemented the Particle Info for OSL. Uses the following attributes:
...
* std::particle_index
* std::particle_age
* std::particle_lifetime
* std::particle_location
* std::particle_size
* std::particle_velocity
* std::particle_angular_velocity
Just as with SVM the rotation state attribute is currently disabled due to lack of a proper quaternion or matrix type in Cycles nodes.
2012-09-14 19:09:25 +00:00
Lukas Toenne
df79ab5a77
Added Object Info node implementation for OSL. This uses an additional attribute check in the osl_services callback for special attribute names related to objects:
...
* std::object_location
* std::object_index
* std::material_index
* std::object_random
Other object-based attributes can be added for particle info in the same way.
2012-09-14 18:10:54 +00:00
Lukas Toenne
1352a955ca
Cleanup for OSL linking in cmake: Move cmake OSL library search and path definition from the cycles macro file to the top-level CMakeLists.txt. This makes the OSL_LIBRARIES and other variables accessible throughout Blender cmake scripts and especially in the creator module for linking libraries.
2012-09-10 06:18:20 +00:00
Thomas Dinges
3f7b4916e9
OSL Backend:
...
* Added the Phong BRDF from the inbuilt OSL shader library.
This can be used in OSL shaders only for now:
* phong(normal N, float exponent)
* phong_ramp(normal N, float exponent, color colors[8]
2012-09-05 23:22:36 +00:00
Dalai Felinto
dbe3cea002
silencing some of the warnings in OSL for OSX
2012-09-05 20:50:10 +00:00
Lukas Toenne
f3a91f461c
Fix for OSL memory leak. The context creation for OSL is now done in the shader_setup_* functions, since it should specific to the sample being worked on. The the context release then happens in the kernel_shader functions after shader evaluation is done. Care has to be taken to ensure the shader_release function is also called in cases where the path integration is cancelled early, this was the main cause for unreleased contexts and subsequent new allocations.
2012-09-05 08:12:22 +00:00
Thomas Dinges
65b214ed04
* Forgot to commit CMake change for the Brick texture.
2012-09-05 00:59:04 +00:00
Thomas Dinges
ebe29c3f84
OSL:
...
* Noise Texture is rendering now.
2012-09-04 23:34:08 +00:00
Thomas Dinges
0206d7d02b
Cycles / OSL:
...
* Ported the Brick Texture to OSL. Renders fine :)
2012-09-04 22:33:11 +00:00
Lukas Toenne
95b85a8c37
Revert "Use one context per OSL thread. Not sure if this actually works, but the simple renderer example in OSL does it this way."
...
This does not actually work: The context must not be shared between threads, but using the same context between different samples actually seems to prevent OSL from switching between shaders. The proper solution would be to ensure memory pooling works correctly.
This reverts commit 69f87e69258d6266dcb20f09f7e3d4021e663432.
2012-09-04 17:28:36 +00:00
Thomas Dinges
0e3f3a0aef
OSL:
...
* Holdout shader is now working in OSL.
2012-09-04 16:54:32 +00:00
Lukas Toenne
64a4a05d31
Fix for OSL input parameter name mapping. When assigning input constants to shader parameters, use the compatible_name function to strip whitespace.
2012-09-04 16:47:00 +00:00
Lukas Toenne
f51eb99faa
Minor syntax error in musgrave osl texture.
2012-09-04 16:46:56 +00:00
Thomas Dinges
f2caaaec9b
OSL:
...
* WIP commit of fixes for musgrave and wave.
2012-09-04 16:00:12 +00:00
Thomas Dinges
bf8d695234
OSL:
...
* Gradient texture renders now.
2012-09-04 11:41:48 +00:00
Lukas Toenne
6805db676d
Use one context per OSL thread. Not sure if this actually works, but the simple renderer example in OSL does it this way.
2012-09-04 08:53:47 +00:00
Lukas Toenne
71871463a4
Fix for bad memory leak in OSL: the context created for each OSL sample did not get released properly.
2012-09-04 08:53:44 +00:00
Lukas Toenne
f8c29c999f
Fix for Cycles OSL: The RenderServices pointer in ShadingSystem is no longer accessible from the interface class (presumably because it is just the base class pointer anyway and would have to be casted). The OSLRenderServices pointer to our own implementation is now stored alongside the ShadingSystem in the kernel globals, so it can be accessed in thread_init.
2012-09-03 18:51:02 +00:00
Thomas Dinges
bf395ff0b8
OSL / Cmake:
...
* Holdout shader was missing in cmake.
2012-09-03 14:08:03 +00:00
Lukas Toenne
2f70800923
Fix for OSL shader install paths.
2012-09-03 11:38:22 +00:00
Lukas Toenne
c0a3657e7a
Added library linking for cycles_kernel_osl to OSL libraries and added cycles_kernel_osl to the list of blender libs in creator.
2012-09-03 11:38:18 +00:00
Thomas Dinges
dfec5a3655
* Removed last occurrence of get_pointcloud_attr_query.
2012-09-02 17:39:07 +00:00
Thomas Dinges
add7ca12d9
* OSL can't overwrite input parameters, use a local variable instead.
2012-09-02 16:37:58 +00:00
Thomas Dinges
b26d19a7b8
Cycles / OSL:
...
* Updates for noise_turbulence, to match svm function.
2012-09-02 16:06:18 +00:00
Lukas Toenne
e1bca6cfc4
Fixed a number of OSL syntax errors from the updated 1.2 API. Microfacet functions now all take an eta parameter, set to 1.0 if no IOR is given.
2012-09-02 15:41:35 +00:00
Thomas Dinges
28d02bc056
Fix for r50314:
...
* oren_nayar is not part of the default stdosl, added it back.
2012-09-02 15:26:13 +00:00
Lukas Toenne
092f6344c3
Fixed remaining syntax errors in OSL files. node_sepcomb_rgb.osl is split into 2 parts, since OSL only allows one shader per file.
2012-09-02 15:07:51 +00:00
Thomas Dinges
f1d279912f
Cycles / OSL:
...
* Add oslutil.h, from osl 1.2.
2012-09-02 13:34:12 +00:00
Thomas Dinges
6c02a8fc8c
OSL / Cycles:
...
* Update the stdosl header file, from official osl 1.2.
2012-09-02 13:23:44 +00:00
Thomas Dinges
25fc454ce0
Cycles / OSL:
...
* Remove declaration of node_blend_weight_texture from cmake, does not exist, and match node_blend_weight name in nodes.cpp with the actual file.
2012-09-02 12:46:54 +00:00
Thomas Dinges
23dca13691
Cycles / OSL:
...
* First batch of compile fixes for several shaders, mainly syntax errors.
2012-09-02 12:24:04 +00:00
Thomas Dinges
748582f49e
Cycles / OSL:
...
Fixes for API changes in OSL RendererServices:
* Added two new required get_matrix methods, from OSL RendererServices (otherwise the constructor fails). The two new matrix methods probably still need an implementation.
* Removed deprecated "get_pointcloud_attr_query" and "pointcloud". There are two new routines for pointclouds, function headers for those are there.
* Removed the (unused) PARTIO code parts from OSL. It was marked as not tested / not working, and due to the api changes here broken for sure. Code is still in svn history if needed.
2012-09-02 01:10:31 +00:00
Thomas Dinges
fda711a851
Cycles / OSLGlobals:
...
* Fixes for changes in the Open Shading Langauge API from version 0.6.0: 11ce51418b
* Removed the need for ShadingSystemImpl.
2012-08-31 20:31:21 +00:00
Thomas Dinges
7ac0dd2953
Cycles / OSL:
...
* OSL namespace fixes for osl_shader.cpp.
2012-08-31 20:08:55 +00:00
Thomas Dinges
01815d83fb
Cycles / OSL:
...
* Fixes for changes in r40163. Removed unused code and fixed emissive_eval function.
2012-08-31 19:59:50 +00:00
Dalai Felinto
ded5e9cd23
clamp for Mix node
...
the implementation was following my early commit for Math node
I haven't had a chance to run those through Brecht, but would like to do eventually. (they work fine though)
2012-08-30 06:31:02 +00:00
Dalai Felinto
c052ebda8e
Cycles bugfix: [32431] Cycles Math Node : Clamp does not work
...
the OSL solution is slightly different than the svm, but I think it's fine.
thanks Lukas Toenne for helping with a fix on the original patch
2012-08-29 17:30:14 +00:00
Campbell Barton
0fbb6bff27
style cleanup: block comments
2012-06-09 17:22:52 +00:00
Thomas Dinges
46945d805f
Revert my own commit r47544, this does not seem to be the correct fix. :/
2012-06-06 23:01:42 +00:00
Thomas Dinges
379c4ae4d8
Cycles / OSL:
...
* Missing header kernel_passes.h, needed for "direction_to_panorama" in kernel_triangle.h
2012-06-06 22:36:07 +00:00
Thomas Dinges
47c96b6e40
Cycles / OSL:
...
* Fixes for some silly typos in the checker shader.
* Added missing GPL licence block to node_fresnel.h.
2012-06-06 16:00:21 +00:00
Thomas Dinges
da38a0348a
Cycles / OSL:
...
* Fixes for r46114, object_fetch_transform missed time argument.
* Syntax fixes for Checker texture.
2012-06-05 15:40:02 +00:00
Thomas Dinges
2221b994bc
Cycles / OSL:
...
* Remove oslexec_pvt.h header and some typo fixes.
* This file needs deeper updates for changes done in OSL 0.6.0, see
11ce51418b
2012-06-05 09:29:47 +00:00