ID2D1DrawInfo::SetPixelShader method (d2d1effectauthor.h)
Set the shader instructions for this transform.
Syntax
HRESULT SetPixelShader(
[in] REFGUID shaderId,
D2D1_PIXEL_OPTIONS pixelOptions
);
Parameters
[in] shaderId
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
Requirement | Value |
---|---|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | d2d1effectauthor.h |
Library | D2d1.lib |