From a14fe128fccd9f5d55afd6345e3dad19a7b4ea9f Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Tue, 23 Sep 2025 12:19:44 +0200 Subject: [PATCH] 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 --- intern/cycles/device/metal/bvh.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intern/cycles/device/metal/bvh.mm b/intern/cycles/device/metal/bvh.mm index 3506d9ab579..d9c96740898 100644 --- a/intern/cycles/device/metal/bvh.mm +++ b/intern/cycles/device/metal/bvh.mm @@ -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);