Alpha Blending not working like i want...

Started by
7 comments, last by Slug 18 years, 10 months ago
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?
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 ;)
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
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.
Opss! Dosen't know it! Wait 5 min.!
It's ok now???
no.
[size="1"]
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.
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
Ok, if it don't show up, just type:

http://www.freewebs.com/vortex666/Bug.jpg
So, somebody have an idea???

This topic is closed to new replies.

Advertisement