* Cycles Mix closure could render strange effects, when the user entered a value out of the 0...1 range. This was already clamped for OSL, clamp for SVM as well.
This commit is contained in:
Thomas Dinges 2013-06-01 12:23:49 +00:00
parent f32615653b
commit e46a8f5d76

@ -599,6 +599,8 @@ __device void svm_node_mix_closure(ShaderData *sd, float *stack,
decode_node_uchar4(node.y, &weight_offset, &in_weight_offset, &weight1_offset, &weight2_offset);
float weight = stack_load_float(stack, weight_offset);
weight = clamp(weight, 0.0f, 1.0f);
float in_weight = (stack_valid(in_weight_offset))? stack_load_float(stack, in_weight_offset): 1.0f;
if(stack_valid(weight1_offset))