Help: Blending issue

Started by
0 comments, last by Ashaman73 11 years, 5 months ago
Hi all,
I am trying to recover a particle system that I programmed some time ago.
The main difference between "some time ago" and "now" in my engine is that now I render all transparent objects in a different buffer. This buffer is a multi render target (2 buffers) of 64 bits per pixel each buffer. I do this because I use one buffer for color and the another one for displacement.
I have an issue with the blending, I use the standar blending new*alfa+old*(1-alfa) (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) and with 30,000 particles I have this:

attractio20121021182040.png


The expected result should be be different, something like this:

attractio20121021182324.png

This pictures has only 1,000 particles because I use new+old blending (GL_ONE,GL_ONE) for this screenshot. It's only to exemplify the expected result, but of course is wrong, with more particles everything will become white.

Any idea of why I am getting this behavior with GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA? I am not sure if the problem is the multi render target or the 64 bits buffers.

Thanks
Advertisement

GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA

I guess you have enabled the z-buffer ? Nevertheless, if you want to render alpha blended surfaces correctly, you need to sort them.

This topic is closed to new replies.

Advertisement