Render target packing optimizations

Hello, I have been working on a simple water sim for fun lately and have come to a divergence point regarding the structure of the project. Let’s consider three single channel, low precision render targets:
Foam, Old foam, and Roughness.

What are the real performance gains from taking these 3 distinct render targets single channel and packing them into 1 low precision RGB render target?

None what so ever if you are doing this at runtime?

The cost is in the rendering of each alpha map. Unless you can somehow derive all you need from a single frame of a single RTV you won’t be gaining anything at all from packing stuff differently.

And actually even if you did, the sheer fact you have to read the rt, do something and write it again is a net performance loss/non-starter.

You can try a single post-process that outputs RGBA as needed initially - save to 1 RT, and try to coax something togeter by reading in the material.

Honestly - it’s too cost prohibitive if you have an avarage (or below avarage) project/engine setup.

At 4k rendering the engine (4.x) C-raps out with a full ocean and an 8 cluster Gerstner well before you introduce localized effects via RT (or RTV) - on an well optimized seamless mesh instancing system.

So yea, you can obviously do anything, but because the engine is bad, and the cost is bad, making it sort of useless… or rather, one can put the same effort in doing better in a different engine and get a playable/enjoyable result, so I’m not discouraging you - just pointing out that picking your battles is always a good idea :wink: