Skip to main content
added 143 characters in body
Source Link
jmegaffin
  • 4.9k
  • 2
  • 26
  • 46

Make sure you renderCopy the depth information to the framebuffer,la-buffer and then you can just use forward rendering onrender normally to the same framebufferla-buffer using forward shading. All you need to do to copy over the depth information is add this to the light accumulation fragment shader:

gl_FragDepth = texture(depthBuffer, texCoord).r;

Make sure you render the depth information to the framebuffer, and then you can just use forward rendering on the same framebuffer.

Copy the depth information to the la-buffer and then render normally to the la-buffer using forward shading. All you need to do to copy over the depth information is add this to the light accumulation fragment shader:

gl_FragDepth = texture(depthBuffer, texCoord).r;
Source Link
jmegaffin
  • 4.9k
  • 2
  • 26
  • 46

Make sure you render the depth information to the framebuffer, and then you can just use forward rendering on the same framebuffer.