diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index c5ecddcfc15..c1d2eade5e5 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -351,6 +351,9 @@ bool OSLCompiler::node_skip_input(ShaderNode *node, ShaderInput *input) { /* exception for output node, only one input is actually used * depending on the current shader type */ + + if(!(input->usage & ShaderInput::USE_OSL)) + return true; if(node->name == ustring("output")) { if(strcmp(input->name, "Surface") == 0 && current_type != SHADER_TYPE_SURFACE)