Sign in to follow this  

Render to texture while reading from existing framebuffer

This topic is 1700 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is this possible?

 

What I'm looking to do is render a load of particles into a texture however still using the framebuffer's zbuffer which hasn't been cleared and then composite that with the main color framebuffer (which already has the scene rendered into it).
 

I've tried just not attaching the depth component to the FBO but that didn't work.

 

Or do I need to render the scene to a rtt, copy it's depth texture into the particles rtt depth texture and then render into the particles rtt?

 

Thanks

Share this post


Link to post
Share on other sites

Your depth buffer need to be attached as part of your FBO. Once you bind an FBO it is like your default depth buffer doesn't exist and all render takes place only on the FBO until it is unbind.

Share this post


Link to post
Share on other sites
Sign in to follow this