Cycles: Sync BVH8 unaligned node packing code with BVH4
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 27 Sep 2018 11:42:16 +0000 (13:42 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 27 Sep 2018 12:49:12 +0000 (14:49 +0200)
Similar to dfae3de6bdf.

intern/cycles/bvh/bvh8.cpp

index 70d003d938aaee47d73446801fe0c0f2d3112d4c..8db06c318632d421615b60e8fe54a85cde263207 100644 (file)
@@ -222,21 +222,21 @@ void BVH8::pack_unaligned_node(int idx,
                 * so kernel might safely assume there are always 4 child nodes.
                 */
 
-               data[1][i] = 1.0f;
-               data[2][i] = 0.0f;
-               data[3][i] = 0.0f;
+               data[1][i] = NAN;
+               data[2][i] = NAN;
+               data[3][i] = NAN;
 
-               data[4][i] = 0.0f;
-               data[5][i] = 0.0f;
-               data[6][i] = 0.0f;
+               data[4][i] = NAN;
+               data[5][i] = NAN;
+               data[6][i] = NAN;
 
-               data[7][i] = 0.0f;
-               data[8][i] = 0.0f;
-               data[9][i] = 0.0f;
+               data[7][i] = NAN;
+               data[8][i] = NAN;
+               data[9][i] = NAN;
 
-               data[10][i] = -FLT_MAX;
-               data[11][i] = -FLT_MAX;
-               data[12][i] = -FLT_MAX;
+               data[10][i] = NAN;
+               data[11][i] = NAN;
+               data[12][i] = NAN;
 
                data[13][i] = __int_as_float(0);
        }