Full screen render targets - how many?
[edit] Also a full and half res D24S8.
Some people prefer to re-use the same render targets as much as possible, and others would use a separate render target for each pass, which would make it easier to debug and do non-destructive changes.
Render game scene to render target
Post process render target
Blend render target with back buffer
Render HUD to 'other' render target
Post process render target (if reqd)
Blend render target with back buffer
And so on...
So when I render my scene to each render target, I clear it first (depth and colour), with 0,0,0,0 (so effectively transparent - I hope).
And my 'blend render target with back buffer shader' simply renders to the back buffer surface using:
BlendOp=ADD;
SrcBlend=SRCALPHA;
DestBlend=INVSRCALPHA;
AlphaBlendEnable=TRUE;
The problem is, this doesn't work properly. If I set the pixel output's alpha component to 0.5f in the blend shader, it kind of works but as you can imagine the game scene is half brightness as is the HUD scene.
I'm pretty sure I've missed something here - any ideas?
Last time around, 4x FP32 for deferred shading and the final resolve. This time, 3xFP16 for light prepass, 2xFP16 for HDR post processing, 1x RGBA8 for LDR post processing, and then the final framebuffer. I'm in the camp of keeping things separate throughout stages, but memory isn't a concern for us.
but memory isn't a concern for us
Really? How'd you manage that?
Current project's a custom installation and the min spec is GTX 690 or Titan cards in SLI. It's a nice way to work.
very interesting thread...
gbuffer:
1 FP32 rgba bit (will probably be dropped once i reconstruct position from depth)
2 FP8 rgba
bloom:
1 halfsize FP8 rgb
distortion:
1FP8 rg
shadowmap:
1 2048x2048 FP8 r
light accumulation:
1 FP8 rgb
i guess im being very wasteful with memory, but optimizimg should be the last step of the process right? =)