SceneKit and Metal Compute pipelines - triple buffer?

I'm working on an application that takes a stream of CVPixelBufferRef objects (typically from AVFoundation), uses that image data to compute some 3D data, and then displays both the 2D data and the 3D data in different views. It works reasonably well for a CPU-based approach, but now I want to move to GPU calculation.


I've been working through the Metal examples & WWDC sessions, and one of the recommendations is to triple-buffer the incoming data to optimise the CPU & GPU. However, my application uses SceneKit (SCNView, specifically) to display the 3D results, since using the built-in rendering system fits my needs at this time and I don't want to worry about defining my own lights/clipping etc. My compute shader executes during the renderer:updateatTime: call for the view's SCNSceneRenderDelegate.


Should I be attempting to work a triple-buffer system into SCNView? Or does SCNView use this best-practice internally?

Post not yet marked as solved Up vote post of simwilson Down vote post of simwilson
479 views