ID2D1EffectContext::LoadPixelShader method (d2d1effectauthor.h)
Loads the given shader by its unique ID. Loading the shader multiple times is ignored. When the shader is loaded it is also handed to the driver to JIT, if it hasn’t been already.
Syntax
HRESULT LoadPixelShader(
[in] REFGUID shaderId,
[in] const BYTE *shaderBuffer,
UINT32 shaderBufferCount
);
Parameters
[in] shaderId
Type: REFGUID
The unique id that identifies the shader.
[in] shaderBuffer
Type: const BYTE*
The buffer that contains the shader to register.
shaderBufferCount
Type: UINT32
The size of the shader buffer in bytes.
Return value
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
HRESULT | Description |
---|---|
S_OK | No error occurred. |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
Remarks
The shader you specify must be compiled, not in raw HLSL code.
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 |