Deferred rendering order?
- by Nick Wiggill
There are some effects for which I must do multi-pass rendering. I've got the basics set up (FBO rendering etc.), but I'm trying to get my head around the most suitable setup. Here's what I'm thinking...
The framebuffer objects:
FBO 1 has a color attachment and a depth attachment.
FBO 2 has a color attachment.
The render passes:
Render g-buffer: normals and depth (used by outline & DoF blur shaders); output to FBO no. 1.
Render solid geometry, bold outlines (as in toon shader), and fog; output to FBO no. 2. (can all render via a single fragment shader -- I think.)
(optional) DoF blur the scene; output to the default frame buffer OR ELSE render FBO2 directly to default frame buffer.
(optional) Mesh wireframes; composite over what's already in the default framebuffer.
Does this order seem viable? Any obvious mistakes?