ID3D11VideoContext::VideoProcessorSetStreamAlpha method (d3d11.h)
Sets the planar alpha for an input stream on the video processor.
Syntax
void VideoProcessorSetStreamAlpha(
[in] ID3D11VideoProcessor *pVideoProcessor,
[in] UINT StreamIndex,
[in] BOOL Enable,
[in] FLOAT Alpha
);
Parameters
[in] pVideoProcessor
A pointer to the ID3D11VideoProcessor interface. To get this pointer, call ID3D11VideoDevice::CreateVideoProcessor.
[in] StreamIndex
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
[in] Enable
Specifies whether alpha blending is enabled.
[in] Alpha
The planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque). If Enable is FALSE, this parameter is ignored.
Return value
None
Remarks
To use this feature, the driver must support stereo video, indicated by the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALHPA_STREAM capability flag. To query for this capability, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps.
Alpha blending is disabled by default.
For each pixel, the destination color value is computed as follows:
Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)
where:
Cd
= The color value of the destination pixelCs
= The color value of the source pixelAs
= The per-pixel source alphaAp
= The planar alpha valueAe
= The palette-entry alpha value, or 1.0 (see Note)
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | d3d11.h |