We use Graphics.Blit to simply copy the frame buffer to a texture. I noticed that adding OnRenderImage Graphics.Blit can reduce my framerate 20-30fps on high res iPad devices. On my iphone 5s it is having a 4-5ms cost and even higher on high res devices. I saw this issue
Not sure if it’s related because it says Android.
I did a bit of debugging and it looks like Hidden/BlitCopy takes up most of the GPU time. It also looks like it’s doing a copy of the depth and stencil possibly.
I’m doing a simple Blit to a lower res texture no post processing effects.
We are actually having the same issue. We are blitting a small texture to perform some work on it (128x128), we are blitting it 4 times and 2 of those are just blit copies. Just a simple blit copy takes 0.25ms.
When using OnRenderImage, you are forcing unity to render the camera into a RenderTexture instead of directly to the framebuffer, which can possibly double your fill rate (one draw into a rendertexture, a second draw to the framebuffer).
iPad’s have high resolution and typically have fill-rate issues. You would see less of a slowdown of lower resolution devices.
I looked at the decompiled metal shader and I notice there is color Globals multiply. Can this be removed @Aras@Alexey ? It looks like it requires a cast and a multiply. Maybe that could shave off some millisecs? I actually tested it by recompiling the shader and the results look same.