FrontFacingNode

Last modified: Jun 30, 2024

This node can be used to evaluate whether a primitive is front or back facing.

Constructor

new FrontFacingNode()

Constructs a new front facing node.

AccessorType

Properties

PropertyTypeDefault Value
isFrontFacingNodeboolean
MethodType

Extends

Node

frontFacing

TSL object that represents whether a primitive is front or back facing

Type

FrontFacingNode<bool>

faceDirection

TSL object that represents the front facing status as a number instead of a bool. 1 means front facing, -1 means back facing.

Type

Node<float>
N E W

negateOnBackSide

Negates a vector if the rendering occurs on the back side of a face, based on the material’s side configuration.

  • If the material’s side is BackSide , the vector is inverted (negated).
  • If the material’s side is DoubleSide , the vector is multiplied by faceDirection (negated only for back-facing fragments).
  • If the material’s side is FrontSide (default), the vector remains unchanged.
ParameterTypeDefault Value
vectorNode<vec3>

Returns

Node<vec3>

directionToFaceDirection

Negates a vector if the rendering occurs on the back side of a face, based on the material’s side configuration.

  • If the material’s side is BackSide , the vector is inverted (negated).
  • If the material’s side is DoubleSide , the vector is multiplied by faceDirection (negated only for back-facing fragments).
  • If the material’s side is FrontSide (default), the vector remains unchanged.
ParameterTypeDefault Value
vectorNode<vec3>

Returns

Node<vec3>