Jump to content

  • Log In with Google      Sign In   
  • Create Account


Render to texture while reading from existing framebuffer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 JohnOwens   Members   -  Reputation: 134

Like
0Likes
Like

Posted 21 May 2013 - 04:55 PM

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



Sponsor:

#2 BornToCode   Members   -  Reputation: 916

Like
0Likes
Like

Posted 21 May 2013 - 11:45 PM

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.



#3 JohnOwens   Members   -  Reputation: 134

Like
0Likes
Like

Posted 22 May 2013 - 05:13 AM

Thanks I was beginning to suspect that :-)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS