Sign in to follow this  
M4573R

Additive blending maxes out

Recommended Posts

M4573R    144
I'm trying to blend a bunch of planes together, but the alpha isn't adding up correctly. I'm using INVSRCALPHA and SRCALPHA for my dest blend and src blend. My planes have .5 alpha and 1,1,1 color , so when I look through two planes, I should see solid white. However looking through over 20 planes seems to only add up to a total of .5 alpha.

Share this post


Link to post
Share on other sites
Erik Rufelt    5901
That's not additive blending, try SRC_ALPHA for source and ONE for dest.

SRC, INVSRC still shouldn't give 0.5 though.. it simply averages between source and dest each pass, and so should result in:
First draw: 1 * 0.5 + 0 * 0.5 = 0.5
Second: 1 * 0.5 + 0.5 * 0.5 = 0.75
Third: 1 * 0.5 + 0.75 * 0.5 = 0.875
Fourth: 1 * 0.5 + 0.875 * 0.5 = 0.9375

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this