#4 Members - Reputation: 623
Posted 26 February 2013 - 12:10 PM
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.
#5 Members - Reputation: 395
Posted 26 February 2013 - 04:19 PM
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?
#6 Moderators - Reputation: 2545
Posted 26 February 2013 - 07:53 PM
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.
#9 Members - Reputation: 218
Posted 27 February 2013 - 02:09 AM
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? =)
#11 Members - Reputation: 4746
Posted 27 February 2013 - 04:31 AM
Beside D24S8 and 2k shadow map, only 4xFP16 rendertargets (fullscreen and some half res, user have the option to change this) and the option to separate the screenresolution from render resolution (you can use a screenresolution of 1920x1080, good for the gui, and a render resolution of 1280x720 to improve preformance).
My game: Gnoblins
Developer journal about Gnoblins
Small goodies: Simple alpha transparency in deferred shader
#12 Members - Reputation: 218
Posted 02 March 2013 - 10:56 AM
1 halfsize FP8 rgb
How do you do bloom with only one render target? Eg, do you only use one for your blur pass?
nope, of course i got a bunch of smaller targets... but they are, well, smaller^^. didn't think quarter size was worth mentioning







