Fix #33183: cycles bump mapping was not executed with only an AO node in a material.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 15 Nov 2012 14:08:46 +0000 (14:08 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 15 Nov 2012 14:08:46 +0000 (14:08 +0000)
intern/cycles/kernel/shaders/node_ambient_occlusion.osl
intern/cycles/render/nodes.cpp

index 57a06f35461437eac669901432e3df0409f5a813..b9423344e73565e399b9a037bc7d6581a599fcea 100644 (file)
@@ -19,6 +19,7 @@
 #include "stdosl.h"
 
 shader node_ambient_occlusion(
+       normal NormalIn = N,
        color Color = color(0.8, 0.8, 0.8),
        output closure color AO = ambient_occlusion())
 {
index 82afab4dc1a793a1fb4e7aff76327b2c77f3d167..cdc3b555a5119217b58dd569564802abe6e092fc 100644 (file)
@@ -1578,6 +1578,8 @@ void HoldoutNode::compile(OSLCompiler& compiler)
 AmbientOcclusionNode::AmbientOcclusionNode()
 : ShaderNode("ambient_occlusion")
 {
+       add_input("NormalIn", SHADER_SOCKET_NORMAL, ShaderInput::NORMAL, true);
+
        add_input("Color", SHADER_SOCKET_COLOR, make_float3(0.8f, 0.8f, 0.8f));
        add_output("AO", SHADER_SOCKET_CLOSURE);
 }