D2DSampleInput function
Samples input N at position uv. Only available for complex inputs.
Syntax
float4 WINAPI D2DSampleInput(
in uint N,
in float2 uv
);
Parameters
-
N [in]
-
The input number.
-
uv [in]
-
The uv position.
Return value
The function returns a float4, in the format TEXCOORDN.
Remarks
The following example shows the function being used to calculate surface normals.
float3 CalculateSurfaceNormal(TAPARGS)
{
float3 normal = float3(0, 0, 1.0);
// unrolled loop
normal.xy += tap1.zw * D2DSampleInput(0, tap1.xy).a;
normal.xy += tap2.zw * D2DSampleInput(0, tap2.xy).a;
normal.xy += tap3.zw * D2DSampleInput(0, tap3.xy).a;
normal.xy += tap4.zw * D2DSampleInput(0, tap4.xy).a;
normal.xy += tap5.zw * D2DSampleInput(0, tap5.xy).a;
normal.xy += tap6.zw * D2DSampleInput(0, tap6.xy).a;
normal = normalize(normal);
return normal;
}
Requirements
Requirement | Value |
---|---|
Header |
|
DLL |
|
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για