[Bf-blender-cvs] [e92e90c30e1] master: Cycles: Fix wrong looking voronoi of second 2nd closest
Sergey Sharybin
noreply at git.blender.org
Fri Aug 24 12:37:43 CEST 2018
Commit: e92e90c30e148bf216fbf9829cdc4a7058cfd6f8
Author: Sergey Sharybin
Date: Fri Aug 24 12:29:13 2018 +0200
Branches: master
https://developer.blender.org/rBe92e90c30e148bf216fbf9829cdc4a7058cfd6f8
Cycles: Fix wrong looking voronoi of second 2nd closest
Was only happening for release builds made with GCC-8. Probably some
optimization strtegy was confused by uninitialized variable.
===================================================================
M intern/cycles/kernel/svm/svm_voronoi.h
===================================================================
diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h
index 75af910d940..4e66e87611f 100644
--- a/intern/cycles/kernel/svm/svm_voronoi.h
+++ b/intern/cycles/kernel/svm/svm_voronoi.h
@@ -32,6 +32,11 @@ ccl_device void voronoi_neighbors(float3 p, NodeVoronoiDistanceMetric distance,
da[2] = 1e10f;
da[3] = 1e10f;
+ pa[0] = make_float3(0.0f, 0.0f, 0.0f);
+ pa[1] = make_float3(0.0f, 0.0f, 0.0f);
+ pa[2] = make_float3(0.0f, 0.0f, 0.0f);
+ pa[3] = make_float3(0.0f, 0.0f, 0.0f);
+
int3 xyzi = quick_floor_to_int3(p);
for(int xx = -1; xx <= 1; xx++) {
More information about the Bf-blender-cvs
mailing list