Alpha Blending not working like i want...
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?
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 ;)
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.
Quote:Original post by mrbastard
no.
it is... if you force a reload in the unfourtunate case that you viewed this topic before he properly uploaded the image.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement