Jump to content
  • Advertisement
Sign in to follow this  
Slug

Alpha Blending not working like i want...

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

Hi, i just have a little problem with the reflection in my game. When i reder the reflected meshs, i blend them with the reflector surface, but the problem arise when two or more overlapping polygon are drawn at the same time. The two color add together and this make a darker spot than suposed, scrapping the effect. Here a snapshot of the problem: My glBlendFunc code is declared like that: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); How can i solve that?

Share this post


Link to post
Share on other sites
Advertisement
hrm... I would advice you to put that image on some webspace somewhere instead of having it sit on your machine... just a tiny bit hard for us other people to see it otherwise ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by Slug



You can't post a picture like that you need some webspace somewhere. Try ImageShack.

I'm guessing you want to do some kind of stencil reflection. First of all, you don't need to blend the reflected geometry, you can blend a big flat surface on top to make it look like water or something.

Secondly if you really want to blend it like that you'll need to do 2 passes. First pass you only draw in the Zbuffer thus storing the final Z values (glColorMask). Then you disable Zwrite and Ztest and render in the color buffer.

Share this post


Link to post
Share on other sites
Ok, if it don't show up, just type:

http://www.freewebs.com/vortex666/Bug.jpg

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!