Fix #138509: Cycles: Point clouds do not render properly when using spatial splits

The bounds growth should take the radius of the points into account.

This affect BVH2, so GPU rendering without hardware ray-tracing.

Pull Request: https://projects.blender.org/blender/blender/pulls/139604
This commit is contained in:
David Murmann
2025-06-03 19:28:47 +02:00
committed by Brecht Van Lommel
parent 04bc3f155e
commit 6805385cbe

View File

@@ -449,11 +449,11 @@ void BVHSpatialSplit::split_point_primitive(const PointCloud *pointcloud,
}
point = get_unaligned_point(point);
if (point[dim] <= pos) {
if (point[dim] - radius <= pos) {
left_bounds.grow(point, radius);
}
if (point[dim] >= pos) {
if (point[dim] + radius >= pos) {
right_bounds.grow(point, radius);
}
}