Before updating to 2017, we used an alternative way of doing post effects:
- in OnPreRender, assign a render texture to camera.
- in OnPostRender, set camera.targetTexture to null, and do post effects on the updated render texture, eventually Blit to screen(null as RenderTexture).
For a mobile project, this is much better than using Unity’s OnRenderImage:
- We can use the appropriate format for camera.targetTexture and every intermediate RT’s used for post effects. In our case, it is R11G11B10, which has the same memory as RGBA8 while having basic ability to do HDR render. If we use OnRenderImage, the source and destination RT will be forced to RGBAHalf format, which use 2x memory than our solution.
- We can limit the number of intermediate RT’s to a minimum amount.
Now in Unity 2017 these are not possible anymore. If we are forced to do all post processing in OnRenderImage, memory consumption will be greatly increased especially on device with high resolution. Basically, it means that we are losing the market share of iPhone 6 and 6 plus, and other device that have 1G ram.
This is submitted as a bug, case 937031. I hope this is not the design choice of unity.