Jump to content
  • Advertisement
Sign in to follow this  
Rasmadrak

framebuffer copying with alpha?

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

Yeapp, the problem is as follows: I draw something to a separate buffer I "render to a texture" i.e copying the rendered buffer into a texture. problem: Its fully opaque... right now I mask the terrain using the stencil buffer, and draw the rendered texture, then draw the terrain again... it seems like a silly solution... :/ so... is it possible to draw shadows or reflections in a separate buffer and then draw it ontop of the terrain, and with the correct depth of the scene...?

Share this post


Link to post
Share on other sites
Advertisement
ok...

forget I posted...


Hopefully somebody will send me an angel carrying help... :D


are the auxilary buffers simply RGB buffers without alpha??

Share this post


Link to post
Share on other sites
I don't seew why do you render terrain twice. If you don't do complex lighting calculations based on if fragment is in shadow or not, then it is possible to render gray polygon over entire screen(you just use identity as modelview matrix) and modulate colors.

If you don't,then maybe shadow mapping would be more effective.

But back to you question. AUX buffers are legacy, they aren't widely supported either. If you want to render to texture,you should seiously consider implementing FBO (which is quite efficient)

Share this post


Link to post
Share on other sites
Ok.. :)

the reason I'm doing a second "pass" is that I render reflections to an auxilary buffer, and then edit the texture coords for fake refraction...

But for some weird reason I can draw it after I've drawn the terrain, since it contains no alpha it overdraws everything.... so the reflection frame is from the previous frame... which isn't exactly what I want, because if the fps gets low enough, things look really ugly. :D

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!