Revert "Cycles: Tweak empty boundbox children"
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 15 Sep 2016 07:39:33 +0000 (09:39 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 15 Sep 2016 07:39:33 +0000 (09:39 +0200)
This reverts commit ecbfa31caaadb03c53c0fe1459718b99613c8804.

Original commit broke logic in nodes re-fitting. That area can
access non-existing children momentarely. Not sure what would
be best solution here, for now simply reverting the change/

intern/cycles/bvh/bvh.cpp

index bb326d48502b427909d25b2228eb8464cf9d2987..39b2a0cf4360615043ab02c2587784c5aafb5553 100644 (file)
@@ -885,7 +885,7 @@ void QBVH::pack_aligned_node(int idx,
                data[5][i] = FLT_MAX;
                data[6][i] = -FLT_MAX;
 
-               data[7][i] = __int_as_float(INT_MAX);
+               data[7][i] = __int_as_float(0);
        }
 
        memcpy(&pack.nodes[idx], data, sizeof(float4)*BVH_QNODE_SIZE);
@@ -968,7 +968,7 @@ void QBVH::pack_unaligned_node(int idx,
                data[11][i] = -FLT_MAX;
                data[12][i] = -FLT_MAX;
 
-               data[13][i] = __int_as_float(INT_MAX);
+               data[13][i] = __int_as_float(0);
        }
 
        memcpy(&pack.nodes[idx], data, sizeof(float4)*BVH_UNALIGNED_QNODE_SIZE);