Efficiently updating textures

Hi,

I noticed that the face painting sample is creating cgImages from the PencilKit and then generating texture from those again. I do something similar In my app that currently uses SceneKit and I would like to port to RealityKit. In my code I draw into a CGImage (draw shape, masked image and shadows) and then convert that CGImage to a texture. I would like to optimize that as there is a very noticable latency with this process.

Would it help if made small CGImages (for the local changes) which are then converted to a texture and use DrawQueues to lay those over the existing images?

Or what is the most efficient way to get my changes onto a texture in near real time?

All the best Christoph

Efficiently updating textures
 
 
Q