Sign in to follow this  

framebuffer copying with alpha?

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

This topic is 4511 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this