D2DGetInputCoordinate function
Returns the value of the input TEXCOORDN. Only available for complex inputs.
Syntax
float4 WINAPI D2DGetInputCoordinate( in uint N );
Parameters
- N [in]
-
The input number.
Return value
The function returns a float4, in the format TEXCOORDN.
Remarks
The following example shows the function used for a displacement map effect.
float2 GetDisplacementOffset(float4 uv0, float4 uv1)
{
// TODO: return the displacement offset
}
D2D_PS_ENTRY(DisplacementMapBilinear)
{
const float4 coord0 = D2DGetInputCoordinate(0);
const float4 coord1 = D2DGetInputCoordinate(1);
return D2DSampleInput(0, GetDisplacementOffset(coord0, coord1) * coord0.zw + coord0.xy);
}
Requirements
|
Header |
|
|---|---|
|
DLL |
|
See also
Show: