Node specially useful for Texture correction.
This is also a nice example of a simple node made from scratch in case someone wants to create their custom nodes.
Review by Brecht.
reviewed by Brecht, with help from Lukas.
Note: dot is reversed compared to Blender.
In Blender Normals point outside, while in Cycles they point inside.
If you use your own custom vector with the Normal Node you will see a difference.
If you feed it with object normals it should work just as good.
as with the HSV node the OSL code is relying on the (yet to be implemented) autorename.
Also the svm code could use mix (svm_lerp) instead:
32 . float3 color_inv = make_float3(1.0f, 1.0f, 1.0f) - color;
35 . . stack_store_float3(stack, out_color, svm_lerp(color_inv, color, factor));
I have a feeling that each node 'program' should have the least program as possible. I'll see with Brecht later.
But overall I don't know if that's any fast. And apart from that I think we will need this kind of function to move to a library if multiple functions linked in are not a problem.
----------------------------
reviewed and approved by Brecht
Important note:
the camera Z is reverted compared to Blender render.
Now it goes from zero (camera) to positive (in front of the camera)
.........................
note, the OSL code has a problem.
In the original node the input and output nodes have the same name (Color).
So this will be fixed here once Brecht come up with a nice autorenaming (or we do a doversion patch) for that.
* Add back option to bundle CUDA kernel binaries with builds.
* Disable runtime CUDA kernel compilation on Windows, couldn't get this working,
since it seems to depend on visual studio being installed, even though for
this particular case it shouldn't be needed. CMake only at the moment.
* Runtime compilation on linux/mac should now work if nvcc is not installed in
the default location, but available in PATH.
* Disable precompiled cuda binaries, always do at run time
* Change preview samples default to 10
* Hide volume panels since they don't do anything yet
using them, but rather do it now that I have the chance still. Highlights:
* Wood and Marble merged into a single Wave texture
* Clouds + Distorted Noise merged into new Noise node
* Blend renamed to Gradient
* Stucci removed, was mostly useful for old bump
* Noise removed, will come back later, didn't actually work yet
* Depth setting is now Detail socket, which accepts float values
* Scale socket instead of Size socket
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures
* OpenCL now only uses GPU/Accelerator devices, it's only confusing if CPU
device is used, easy to enable in the code for debugging.
* OpenCL kernel binaries are now cached for faster startup after the first
time compiling.
* CUDA kernels can now be compiled and cached at runtime if the CUDA toolkit
is installed. This means that even if the build does not have CUDA enabled,
it's still possible to use it as long as you install the toolkit.
* Fix crash in light path node
* Fix struct alignment issue for cuda
* Fix issue with instances taking up too much memory
* Fix issue with ray visibility working incorrect on some objects
* Enable OpenCL always and remove option, it has no dependencies so may as well
* Refuse to load kernel if OpenCL version < 1.1, recent drivers are needed
* Better error handling for OpenCL device
* 3D views with rendered draw mode will now revert to wireframe on file load
* add some (disabled) test code for using OpenImageIO in imbuf
* link cycles, openimageio and boost into blender instead of a shared library
* some cmakefile changes to simplify the code and follow conventions better
* this may solve running cycles problems on windows XP, or give a different
and hopefully more useful error message
* kernel has shading nodes / textures disabled, amd/nvidia opencl
compilers choke on these, need to figure out how to avoid this
* works in cycles_test, not available as option in blender yet
* kernel compiles and runs with opencl 1.1 from intel/amd/nvidia