faceforward - HLSL
Microsoft DirectX 9.0 SDK Update (October 2004)

faceforward - HLSL


Tests if a face is visible. Returns -n * sign(dot(i, ng))

Syntax

ret faceforward(n, i, ng)

Where:

NameIn/OutTemplate TypeComponent TypeSize
ninvectorfloatany
iinvectorfloatsame dimension(s) as input n
nginvectorfloatsame dimensions as input n
retoutvectorfloatsame dimensions as input n

Minimum Shader Version

This intrinsic function is supported in the following (or above) shader versions:

Vertex ShaderPixel Shader
vs_1_1ps_1_4


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.