Question

While experimenting with the XNA BlendState class, I found that it has two state groupings:
One for Alpha Blending and one for Color Blending (as the framework calls it).

The mutable members of each group are termed *BlendFunction, *DestinationBlend, and *SourceBlend
(where * is replaced by either Alpha or Color).

I understand how to blend two RGBA colors, and I assume that's what the Color Blending function are for


What's the purpose of this 'alpha blending' that XNA apparently supports? How does it work?

Aren't all 4 color components, including the alpha value, modified by Color Blending anyway?

Was it helpful?

Solution

Yes, all four components are blended by Color blending. Alpha blending lets you set a custom blending that will override the Color blending for just the alpha channel.

So, if you want the same blending function for all channels there is no need to set the alpha blending to any different. It's simply a customization option for using a different blend on the alpha channel.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top