ID3D11DeviceContext::OMSetBlendState Method
Set the blend state of the output-merger stage.
Syntax
void OMSetBlendState(
[in] ID3D11BlendState *pBlendState,
[in] const FLOAT BlendFactor[4],
[in] UINT SampleMask
);
Parameter
pBlendState [in]
Typ: ID3D11BlendState*Pointer to a blend-state interface (see ID3D11BlendState). Passing in NULL implies a default blend state. See remarks for further details.
BlendFactor[4] [in]
Typ: const FLOATArray of blend factors, one for each RGBA component. This requires a blend state object that specifies the D3D11_BLEND_BLEND_FACTOR option.
SampleMask [in]
Typ: UINT32-bit sample coverage. The default value is 0xffffffff. See remarks.
Rückgabewert
Returns nothing.
Hinweise
Blend state is used by the output-merger stage to determine how to blend together two pixel values. The two values are commonly the current pixel value and the pixel value already in the output render target. Use the blend operation to control where the two pixel values come from and how they are mathematically combined.
To create a blend-state interface, call ID3D11Device::CreateBlendState.
Passing in NULL for the blend-state interface indicates to the runtime to set a default blending state. The following table indicates the default blending parameters.
State | Default Value |
---|---|
AlphaToCoverageEnable | FALSE |
BlendEnable | FALSE[8] |
SrcBlend | D3D11_BLEND_ONE |
DstBlend | D3D11_BLEND_ZERO |
BlendOp | D3D11_BLEND_OP_ADD |
SrcBlendAlpha | D3D11_BLEND_ONE |
DstBlendAlpha | D3D11_BLEND_ZERO |
BlendOpAlpha | D3D11_BLEND_OP_ADD |
RenderTargetWriteMask[8] | D3D11_COLOR_WRITE_ENABLE_ALL[8] |
A sample mask determines which samples get updated in all the active render targets. The mapping of bits in a sample mask to samples in a multisample render target is the responsibility of an individual application. A sample mask is always applied; it is independent of whether multisampling is enabled, and does not depend on whether an application uses multisample render targets.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Anforderungen
Header |
D3D11.h |
Bibliothek |
D3D11.lib |