Using a Triangle Acceleration Structure with Transformed Vertices

I have been adapting the Raytracing Sample Project ( Actually, the Swift version created by Marius Horga ) to allow for continual redraws as an array of vertices is transformed by the user.


At this point, I am rebuilding the MPSTriangleAccelerationStructure after each Draw call and feeding it the freshly transformed vertices. This seems like an expensive and unnesesary approach, but taking shortcuts has causes spectacular crashes.


Is there a way to update the MPSTriangleAccelerationStructure without completely recreating and rebuilding it?


Thanks very much - John Lobe

Using a Triangle Acceleration Structure with Transformed Vertices
 
 
Q