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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user