Fix: Cycles: MetalRT motion curves setup bug
MTLAccelerationStructureMotionCurveGeometryDescriptor.controlPointCount should specify the per-step control point count. Although the previous initialisation wasn't manifesting as incorrect behaviour it was technically wrong. Pull Request: https://projects.blender.org/blender/blender/pulls/146568
This commit is contained in:
committed by
Michael Jones (Apple)
parent
f7c01e8076
commit
a14fe128fc
@@ -500,7 +500,8 @@ bool BVHMetal::build_BLAS_hair(Progress &progress,
|
||||
geomDescCrv.radiusBuffers = [NSArray arrayWithObjects:radius_ptrs.data()
|
||||
count:radius_ptrs.size()];
|
||||
|
||||
geomDescCrv.controlPointCount = cpData.size();
|
||||
/* controlPointCount should specify the *per-step* control point count. */
|
||||
geomDescCrv.controlPointCount = cpData.size() / num_motion_steps;
|
||||
geomDescCrv.controlPointStride = sizeof(float3);
|
||||
geomDescCrv.controlPointFormat = MTLAttributeFormatFloat3;
|
||||
geomDescCrv.radiusStride = sizeof(float);
|
||||
|
||||
Reference in New Issue
Block a user