• Advertisement
Sign in to follow this  

Help: Blending issue

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement