Skip to main content
added 51 characters in body
Source Link
Engineer
  • 30.4k
  • 4
  • 76
  • 124

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:

  1. FBO 1 has a color attachment and a depth attachment.
  2. FBO 2 has a color attachment.

The render passes:

  1. Render g-buffer: normals and depth (used by outline & DoF blur shaders); output to FBO no. 1.
  2. 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.)
  3. (optional) DoF blur the scene; output to the default frame buffer OR ELSE render FBO2 directly to default frame buffer.
  4. (optional) Mesh wireframes; composite over what's already in the default framebuffer.

Does this order seem viable? Any obvious mistakes?

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:

  1. FBO 1 has a color attachment and a depth attachment.
  2. FBO 2 has a color attachment.

The render passes:

  1. Render g-buffer: normals and depth (used by outline & DoF blur shaders); output to FBO no. 1.
  2. 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.)
  3. (optional) DoF blur the scene; output to the default frame buffer.
  4. (optional) Mesh wireframes; composite over what's already in the default framebuffer.

Does this order seem viable? Any obvious mistakes?

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:

  1. FBO 1 has a color attachment and a depth attachment.
  2. FBO 2 has a color attachment.

The render passes:

  1. Render g-buffer: normals and depth (used by outline & DoF blur shaders); output to FBO no. 1.
  2. 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.)
  3. (optional) DoF blur the scene; output to the default frame buffer OR ELSE render FBO2 directly to default frame buffer.
  4. (optional) Mesh wireframes; composite over what's already in the default framebuffer.

Does this order seem viable? Any obvious mistakes?

added 4 characters in body
Source Link
Engineer
  • 30.4k
  • 4
  • 76
  • 124

I've a fewThere 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:

  1. FBO 1 has a color attachment and a depth attachment.
  2. FBO 2 has a color attachment.

The render passes:

  1. Render g-buffer: normals and depth (for useused by outline and& DoF blur shaders); output to FBO no. 1.
  2. 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.)
  3. (optional) DoF blur the scene; output to the default frame buffer.
  4. (optional) Mesh wireframes; as these require a different draw call type (GL_LINES*), composite over what's already in the default framebuffer.

Does this order seem viable? Are there any ways in which I can cut it down by at least one pass (other than omitting DoF)Any obvious mistakes?

I've a few 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:

  1. FBO 1 has a color attachment and a depth attachment.
  2. FBO 2 has a color attachment.

The render passes:

  1. Render g-buffer (for use by outline and DoF blur shaders); output to FBO no. 1.
  2. 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.)
  3. (optional) DoF blur the scene; output to the default frame buffer.
  4. (optional) Mesh wireframes; as these require a different draw call type (GL_LINES*), composite over what's already in the default framebuffer.

Does this order seem viable? Are there any ways in which I can cut it down by at least one pass (other than omitting DoF)?

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:

  1. FBO 1 has a color attachment and a depth attachment.
  2. FBO 2 has a color attachment.

The render passes:

  1. Render g-buffer: normals and depth (used by outline & DoF blur shaders); output to FBO no. 1.
  2. 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.)
  3. (optional) DoF blur the scene; output to the default frame buffer.
  4. (optional) Mesh wireframes; composite over what's already in the default framebuffer.

Does this order seem viable? Any obvious mistakes?

Source Link
Engineer
  • 30.4k
  • 4
  • 76
  • 124

Deferred rendering order?

I've a few 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:

  1. FBO 1 has a color attachment and a depth attachment.
  2. FBO 2 has a color attachment.

The render passes:

  1. Render g-buffer (for use by outline and DoF blur shaders); output to FBO no. 1.
  2. 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.)
  3. (optional) DoF blur the scene; output to the default frame buffer.
  4. (optional) Mesh wireframes; as these require a different draw call type (GL_LINES*), composite over what's already in the default framebuffer.

Does this order seem viable? Are there any ways in which I can cut it down by at least one pass (other than omitting DoF)?