Jump to content
  • Advertisement
Sign in to follow this  
M4573R

Additive blending maxes out

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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!