Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

What Is Blend State?

Blend state controls how color and alpha values are blended when combining rendered data with existing render target data.

The blend state class, BlendState, contains state that controls how colors are blended. Each time you render, the pixel data you generate (call it source data) is stored in a render target. The render target might be empty or it might already contain data (call it destination data). Blending occurs each time you combine source and destination data.

You have a lot of control over how you blend the source and the destination data. For example, you can choose to overwrite the destination with the source data by setting BlendState.Opaque or combine the data by adding them together using BlendState.Additive. You can blend only the color data or the alpha data, or both, by setting up the blending functions ColorBlendFunction and AlphaBlendFunction. You can even limit your blending operation to one or more colors (or channels) using ColorWriteChannels.

For an example that creates and uses a state object, see Creating a State Object.

Community Additions

Show:
© 2016 Microsoft