Retrieving FBO data in GLSL
Posted
by Tom Savage
on Stack Overflow
See other posts from Stack Overflow
or by Tom Savage
Published on 2010-06-06T16:26:55Z
Indexed on
2010/06/06
16:32 UTC
Read the original article
Hit count: 422
I'm trying to get MRT working in OpenGL to try out deferred rendering. Here's the situation as I understand it.
- Create 3 render buffers (for example). Two RGBA8 and one Depth32.
- Create an FBO.
- Attach render buffers to FBO. ColorAttachment0/1 for color buffers, DepthAttachment for depth buffer.
- Bind the FBO.
- Draw geometry.
- Send data to different attachments using
gl_FragData[]
in the frag shader.
At this point I would want to take the data in another pass using GLSL, how can a) retrieve data from the framebuffer color attachments, b) get data from the depth component.
© Stack Overflow or respective owner