I have a persistent RGBA32 render texture that I am drawing a few pixels of each frame (Using CommandBuffer.DrawMesh and a custom mesh). On iOS Metal, this does not work as the render texture seems to be cleared without my consent before drawing to it.
I can however blit to the whole texture and discard the pixels I don’t need, and that fixes the issue. But this is bad performance-wise, adding 1ms due to shader complexity.
Any ideas how to get the contents of a rendertexture to stick around while drawing to small portions of it? I don’t think I’ve seen this behaviour documented anywhere. It is only an issue on iOS Metal (having tried Android, PC, WebGL, MacOS, iOS GLES3). I am currently on 2019.3.15f1, and using the standard rendering pipeline.
Thank you!