Create a new BlendState instance.
All factor parameters can take the following values:
All op parameters can take the following values:
Optionalblend: boolean = false
Enables or disables blending. Defaults to false.
OptionalcolorOp: number = BLENDEQUATION_ADD
Configures color blending operation. Defaults to BLENDEQUATION_ADD.
OptionalcolorSrcFactor: number = BLENDMODE_ONE
Configures source color blending factor. Defaults to BLENDMODE_ONE.
OptionalcolorDstFactor: number = BLENDMODE_ZERO
Configures destination color blending factor. Defaults to BLENDMODE_ZERO.
OptionalalphaOp: number
Configures alpha blending operation. Defaults to BLENDEQUATION_ADD.
OptionalalphaSrcFactor: number
Configures source alpha blending factor. Defaults to BLENDMODE_ONE.
OptionalalphaDstFactor: number
Configures destination alpha blending factor. Defaults to BLENDMODE_ZERO.
OptionalredWrite: boolean = true
True to enable writing of the red channel and false otherwise. Defaults to true.
OptionalgreenWrite: boolean = true
True to enable writing of the green channel and false otherwise. Defaults to true.
OptionalblueWrite: boolean = true
True to enable writing of the blue channel and false otherwise. Defaults to true.
OptionalalphaWrite: boolean = true
True to enable writing of the alpha channel and false otherwise. Defaults to true.
Static ReadonlyADDBLENDA blend state that does simple additive blending.
Static ReadonlyALPHABLENDA blend state that does simple translucency using alpha channel.
Static ReadonlyNOBLENDA blend state that has blending disabled and writes to all color channels.
Static ReadonlyNOWRITEA blend state that does not write to color channels.
Gets whether blending is enabled.
Sets whether blending is enabled.
Returns an identical copy of the specified blend state.
The result of the cloning.
Copies the contents of a source blend state to this blend state.
A blend state to copy from.
Self for chaining.
Reports whether two BlendStates are equal.
The blend state to compare to.
True if the blend states are equal and false otherwise.
BlendState is a descriptor that defines how output of fragment shader is written and blended into render target. A blend state can be set on a material using Material#blendState, or in some cases on the graphics device using GraphicsDevice#setBlendState.
For the best performance, do not modify blend state after it has been created, but create multiple blend states and assign them to the material or graphics device as needed.