[Bf-blender-cvs] [c2574431922] master: Fix Cycles assert with mix weights outside of 0..1 range
Brecht Van Lommel
noreply at git.blender.org
Tue Jun 28 19:25:17 CEST 2022
Commit: c257443192238e85e482908f1638c7edc0979f2e
Author: Brecht Van Lommel
Date: Tue Jun 28 19:11:14 2022 +0200
Branches: master
https://developer.blender.org/rBc257443192238e85e482908f1638c7edc0979f2e
Fix Cycles assert with mix weights outside of 0..1 range
This could result in wrong skipping of SVM nodes in the graph. Now make the
logic consistent with the clamping in the OSL implementation and constant
folding.
Thanks to Christophe Hery for finding the problem and providing the fix.
===================================================================
M intern/cycles/kernel/svm/svm.h
===================================================================
diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h
index 624ef810e85..8fd41ec8531 100644
--- a/intern/cycles/kernel/svm/svm.h
+++ b/intern/cycles/kernel/svm/svm.h
@@ -264,11 +264,11 @@ ccl_device void svm_eval_nodes(KernelGlobals kg,
svm_node_mix_closure(sd, stack, node);
break;
case NODE_JUMP_IF_ZERO:
- if (stack_load_float(stack, node.z) == 0.0f)
+ if (stack_load_float(stack, node.z) <= 0.0f)
offset += node.y;
break;
case NODE_JUMP_IF_ONE:
- if (stack_load_float(stack, node.z) == 1.0f)
+ if (stack_load_float(stack, node.z) >= 1.0f)
offset += node.y;
break;
case NODE_GEOMETRY:
More information about the Bf-blender-cvs
mailing list