forked from bartvdbraak/blender
Cycles: fix chained mix/add closures nodes not working.
This commit is contained in:
parent
fd5937fd1f
commit
233f27a7e1
@ -183,10 +183,10 @@ __device void svm_node_mix_closure(ShaderData *sd, float *stack,
|
||||
offset from the current node, so we jump */
|
||||
if(*randb < weight) {
|
||||
*offset += node_jump;
|
||||
*randb = (*randb - weight)/(1.0f - weight);
|
||||
*randb = *randb/weight;
|
||||
}
|
||||
else
|
||||
*randb = *randb/weight;
|
||||
*randb = (*randb - weight)/(1.0f - weight);
|
||||
}
|
||||
|
||||
__device void svm_node_add_closure(ShaderData *sd, float *stack, uint unused,
|
||||
@ -199,10 +199,10 @@ __device void svm_node_add_closure(ShaderData *sd, float *stack, uint unused,
|
||||
of the two closures being added */
|
||||
if(*randb < weight) {
|
||||
*offset += node_jump;
|
||||
*randb = (*randb - weight)/(1.0f - weight);
|
||||
*randb = *randb/weight;
|
||||
}
|
||||
else
|
||||
*randb = *randb/weight;
|
||||
*randb = (*randb - weight)/(1.0f - weight);
|
||||
|
||||
*closure_weight *= 2.0f;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user