Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID2D1DrawInfo::SetPixelShader method

Set the shader instructions for this transform.

Syntax


virtual HRESULT SetPixelShader(
  [in] REFGUID            shaderId,
       D2D1_PIXEL_OPTIONS pixelOptions = D2D1_PIXEL_OPTIONS_NONE
) = 0;

Parameters

shaderId [in]

Type: REFGUID

The resource id for the shader.

pixelOptions

Type: D2D1_PIXEL_OPTIONS

Additional information provided to the renderer to indicate the operations the pixel shader does.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

If this call fails, the corresponding ID2D1Effect instance is placed into an error state and will fail to Draw, it will place the context into an error state which can be retrieved through the ID2D1DeviceContext::EndDraw call.

Specifying pixelOptions other than D2D1_PIXEL_OPTIONS_NONE can enable the renderer to perform certain optimizations such as combining various parts of the effect graph together. If this information does not accurately describe the shader, indeterminate rendering artifacts can result.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1effectauthor.h

Library

D2d1.lib

See also

ID2D1DrawInfo

 

 

Show:
© 2017 Microsoft