Fix #110170: Cycles CUDA cloud rendering artifacts with spatial splits

The fix in commit d9273d857 exposed a pre-existing issue in the code.
This commit is contained in:
Brecht Van Lommel
2023-07-26 16:29:42 +02:00
parent d6aa9906fd
commit 0fab1f4f68

View File

@@ -428,6 +428,7 @@ void BVHSpatialSplit::split_point_primitive(const PointCloud *pointcloud,
/* No real splitting support for points, assume they are small enough for it
* not to matter. */
float3 point = pointcloud->get_points()[prim_index];
float radius = pointcloud->get_radius()[prim_index];
if (tfm != NULL) {
point = transform_point(tfm, point);
@@ -435,11 +436,11 @@ void BVHSpatialSplit::split_point_primitive(const PointCloud *pointcloud,
point = get_unaligned_point(point);
if (point[dim] <= pos) {
left_bounds.grow(point);
left_bounds.grow(point, radius);
}
if (point[dim] >= pos) {
right_bounds.grow(point);
right_bounds.grow(point, radius);
}
}