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.
This commit is contained in:
Sergey Sharybin 2018-08-24 12:29:13 +02:00
parent 9abc2dfa49
commit e92e90c30e

@ -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++) {