faceforward — return a vector pointing in the same direction as another
genType faceforward( | genType N, |
| genType I, | |
genType Nref); |
NSpecifies the vector to orient.
ISpecifies the incident vector.
NrefSpecifies the reference vector.
faceforward orients a vector to point away from a surface as defined by its normal.
If dot(
Nref, I) < 0faceforward returns N, otherwise it returns -.
N