Integer socket support in Cycles. Int values are already supported natively in OSL, but were not used as actual ints on the SVM stack. This patch implements all the necessary functionality to support reading input values from RNA properties and convert between SHADER_SOCKET_INT and other types.

This commit is contained in:
Lukas Toenne
2012-10-20 13:11:45 +00:00
parent cf7dec94fe
commit d36dc6d8de
16 changed files with 152 additions and 13 deletions

View File

@@ -246,6 +246,9 @@ void OSLCompiler::add(ShaderNode *node, const char *name)
case SHADER_SOCKET_FLOAT:
parameter(param_name.c_str(), input->value.x);
break;
case SHADER_SOCKET_INT:
parameter(param_name.c_str(), (int)input->value.x);
break;
case SHADER_SOCKET_CLOSURE:
break;
}