Jump to content
  • Advertisement
Sign in to follow this  

FBO and texture switch

This topic is 3418 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

hello, I attach a texture to FBO color attachment and render to it, all fine.I then attach another texture to the same attachement point and use the old texture that was previously attached as a sampler in a shader and render to the FBO. in my shader I simply sample the previous texture and output to the new texture so I should be getting the same texture but I get a black texture in my new texture, here is what I do: FBObind rendering remembercurrentFBOtexture FBOattach_secondtexture secondtexture=previoustexture takeprevioustextureandpassittoashader renderwithshader FBOunbind ... after this in my FBO current target should be a texture looking just like previous texture but there is only black texture. Can I work with FBO like this? I mean attach a new texture, take old texture, sample it in a shader and output to FBO ?

Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!