Implementing multi-pass rendering in VisionOS

I’m working on a Vision Pro app using Metal and need to implement multi-pass rendering. Specifically, I want to render intermediate results to a texture, then use that texture in a second pass for post-processing before presenting the final output.

What’s the best approach in visionOS? Should I use multiple render passes in a single command buffer or separate command buffers? Any insights on efficiently handling this in RealityKit or Metal?

Thanks!

We recommend starting with this Compositor Services sample project Interacting with virtual content blended with passthrough.

It provides a simple single-encoder rendering pipeline that you can repurpose for more sophisticated techniques like multi-pass rendering. The Render class is where you can use whatever Metal API you like (that's supported on device).

Implementing multi-pass rendering in VisionOS
 
 
Q