VideoProcessorSetStreamAlpha function

Sets the planar alpha for an input stream on the video processor.


VOID APIENTRY* VideoProcessorSetStreamAlpha(
  _In_ D3D10DDI_HDEVICE           hDevice,
  _In_ D3D11_1DDI_HVIDEOPROCESSOR hVideoProcessor,
  _In_ UINT                       StreamIndex,
  _In_ BOOL                       Enable,
  _In_ FLOAT                      Alpha


hDevice [in]

A handle to the display device (graphics context).

hVideoProcessor [in]

A handle to the video processor object that was created through a call to the CreateVideoProcessor function.

StreamIndex [in]

The zero-based index of the input stream.

Enable [in]

If TRUE, alpha blending is to be enabled on the video processor.

Alpha [in]

A pointer to a FLOAT value that specifies the planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque).

Note  If the Enable parameter is FALSE, this parameter is ignored.

Return value

This function does not return a value.


By default, alpha blending is disabled.

For each pixel, the destination color value is computed as follows:

Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)


  • Cd = The color value of the destination pixel
  • Cs = The color value of the source pixel
  • As = The per-pixel source alpha
  • Ap = The planar alpha value
  • Ae = The palette-entry alpha value, or 1.0
Note  Palette-entry alpha values apply only to palettized color formats, and only when the device advertises support for the D3D11_1DDI_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE capability through the GetVideoProcessorCaps function. Otherwise, this factor equals 1.0.

The destination alpha value is computed according to the alpha fill mode. For more information, see VideoProcessorSetOutputAlphaFillMode

The driver reports its ability to support stereo alpha blending for an input stream in the D3D11_1DDI_VIDEO_PROCESSOR_CAPS structure that is returned through the GetVideoProcessorCaps function. If the driver supports the D3D11_1DDI_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_STREAM capability, it can be enabled or disabled to produce stereo video frames.

Note  If the driver does not support the D3D11_1DDI_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO capability, the Microsoft Direct3D runtime does not call the VideoProcessorSetStreamAlpha function.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform



D3d10umddi.h (include D3d10umddi.h)

See also




Send comments about this topic to Microsoft