Skip to content

Latest commit

 

History

History
215 lines (171 loc) · 2.61 KB

File metadata and controls

215 lines (171 loc) · 2.61 KB

faceforward

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.

faceforward(float,float,float)

Parameters

N Type: float

I Type: float

Nref Type: float

Return Value

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"
    }
  ]
}

faceforward(vec2,vec2,vec2)

Parameters

N Type: vec2

I Type: vec2

Nref Type: vec2

Return Value

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"
    }
  ]
}

faceforward(vec3,vec3,vec3)

Parameters

N Type: vec3

I Type: vec3

Nref Type: vec3

Return Value

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"
    }
  ]
}

faceforward(vec4,vec4,vec4)

Parameters

N Type: vec4

I Type: vec4

Nref Type: vec4

Return Value

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"
    }
  ]
}