diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-09-04 20:47:00 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-09-04 20:47:00 +0400 |
commit | 64a4a05d3196447aaa195fc4927438857c6738a2 (patch) | |
tree | 088205a2ba15276ae4254c08a944ffa0666564b5 | |
parent | f51eb99faa79a3538a4bd7383abfd6e9c442240e (diff) |
Fix for OSL input parameter name mapping. When assigning input constants to shader parameters, use the compatible_name function to strip whitespace.
-rw-r--r-- | intern/cycles/kernel/osl/nodes/node_wave_texture.osl | 4 | ||||
-rw-r--r-- | intern/cycles/render/osl.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_wave_texture.osl b/intern/cycles/kernel/osl/nodes/node_wave_texture.osl index 226dd3405c2..db53faaf94b 100644 --- a/intern/cycles/kernel/osl/nodes/node_wave_texture.osl +++ b/intern/cycles/kernel/osl/nodes/node_wave_texture.osl @@ -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); } diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index d4c93c07e2f..dbd6b0ac9d9 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -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; |