faceforward orients a vector to point away from a surface as defined by its normal.
If (dot(Nref, I) < 0) faceforward returns N, otherwise it returns -N.
N Type: float
I Type: float
Nref Type: float
Type: float
JSON
{
"Type": "faceforward(float,float,float)",
"Name": "faceforward(float,float,float)",
"Category": 1,
"InputPins": [
{
"Connection": null,
"Id": "N",
"Type": "float"
},
{
"Connection": null,
"Id": "I",
"Type": "float"
},
{
"Connection": null,
"Id": "Nref",
"Type": "float"
}
],
"OutputPins": [
{
"Id": "",
"Type": "float"
}
]
}
N Type: vec2
I Type: vec2
Nref Type: vec2
Type: vec2
JSON
{
"Type": "faceforward(vec2,vec2,vec2)",
"Name": "faceforward(vec2,vec2,vec2)",
"Category": 1,
"InputPins": [
{
"Connection": null,
"Id": "N",
"Type": "vec2"
},
{
"Connection": null,
"Id": "I",
"Type": "vec2"
},
{
"Connection": null,
"Id": "Nref",
"Type": "vec2"
}
],
"OutputPins": [
{
"Id": "",
"Type": "vec2"
}
]
}
N Type: vec3
I Type: vec3
Nref Type: vec3
Type: vec3
JSON
{
"Type": "faceforward(vec3,vec3,vec3)",
"Name": "faceforward(vec3,vec3,vec3)",
"Category": 1,
"InputPins": [
{
"Connection": null,
"Id": "N",
"Type": "vec3"
},
{
"Connection": null,
"Id": "I",
"Type": "vec3"
},
{
"Connection": null,
"Id": "Nref",
"Type": "vec3"
}
],
"OutputPins": [
{
"Id": "",
"Type": "vec3"
}
]
}
N Type: vec4
I Type: vec4
Nref Type: vec4
Type: vec4
JSON
{
"Type": "faceforward(vec4,vec4,vec4)",
"Name": "faceforward(vec4,vec4,vec4)",
"Category": 1,
"InputPins": [
{
"Connection": null,
"Id": "N",
"Type": "vec4"
},
{
"Connection": null,
"Id": "I",
"Type": "vec4"
},
{
"Connection": null,
"Id": "Nref",
"Type": "vec4"
}
],
"OutputPins": [
{
"Id": "",
"Type": "vec4"
}
]
}