Fix for OSL input parameter name mapping. When assigning input constants to shader...
authorLukas Toenne <lukas.toenne@googlemail.com>
Tue, 4 Sep 2012 16:47:00 +0000 (16:47 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Tue, 4 Sep 2012 16:47:00 +0000 (16:47 +0000)
intern/cycles/kernel/osl/nodes/node_wave_texture.osl
intern/cycles/render/osl.cpp

index 226dd3405c206378837545c5a8c3ac208d6cb6aa..db53faaf94bdc4591c04eaa63e1ab717b245f8e7 100644 (file)
@@ -50,12 +50,12 @@ shader node_wave_texture(
        float Scale = 5.0,
        float Distortion = 0.0,
        float Detail = 2.0,
-       float dscale = 1.0,
+       float DetailScale = 1.0,
        point Vector = P,
        output float Fac = 0.0,
        output color Color = color (0.0, 0.0, 0.0))
 {
-       Fac = wave(Vector, Scale, Type, Detail, Distortion, dscale);
+       Fac = wave(Vector, Scale, Type, Detail, Distortion, DetailScale);
        Color = color(Fac, Fac, Fac);
 }
 
index d4c93c07e2ff061b48fc7f58a92b19e2ae23143e..dbd6b0ac9d946fc6245822b529e68d789464309a 100644 (file)
@@ -200,19 +200,19 @@ void OSLCompiler::add(ShaderNode *node, const char *name)
 
                        switch(input->type) {
                                case SHADER_SOCKET_COLOR:
-                                       parameter_color(input->name, input->value);
+                                       parameter_color(compatible_name(input->name).c_str(), input->value);
                                        break;
                                case SHADER_SOCKET_POINT:
-                                       parameter_point(input->name, input->value);
+                                       parameter_point(compatible_name(input->name).c_str(), input->value);
                                        break;
                                case SHADER_SOCKET_VECTOR:
-                                       parameter_vector(input->name, input->value);
+                                       parameter_vector(compatible_name(input->name).c_str(), input->value);
                                        break;
                                case SHADER_SOCKET_NORMAL:
-                                       parameter_normal(input->name, input->value);
+                                       parameter_normal(compatible_name(input->name).c_str(), input->value);
                                        break;
                                case SHADER_SOCKET_FLOAT:
-                                       parameter(input->name, input->value.x);
+                                       parameter(compatible_name(input->name).c_str(), input->value.x);
                                        break;
                                case SHADER_SOCKET_CLOSURE:
                                        break;