Jump to content

  • Log In with Google      Sign In   
  • Create Account


Help: Blending issue


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Marcel Stockli   Members   -  Reputation: 167

Like
0Likes
Like

Posted 21 October 2012 - 07:48 PM

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:

Posted Image


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

Posted Image

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

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 6951

Like
0Likes
Like

Posted 22 October 2012 - 12:19 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS