1018 B
1018 B
title | date | weight |
---|---|---|
Color Blend State | 2021-01-27T14:11:42-08:00 | 1 |
Color blend state is comprised of three fields - a logical operation, whether that logical operation is enabled, and some blending constants.
LogicOp
lets you do a bitwise combination of the original and new color. You can read about that in more detail over here.
BlendConstants
are used by the blend factors to produce result colors. You can read about that here.
Let's put it all together:
var myBlendConstants = new BlendConstants
{
R = 1f,
G = 1f,
B = 1f,
A = 1f
};
var myColorBlendState = new ColorBlendState
{
LogicOpEnable = true,
LogicOp = LogicOp.And,
BlendConstants = myBlendConstants
};
Further blending state control is provided in GraphicsPipelineAttachmentInfo, which will be discussed later.