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>

directionToFaceDirection

Converts a direction vector to a face direction vector based on the material’s side.

If the material is set to BackSide, the direction is inverted. If the material is set to DoubleSide, the direction is multiplied by faceDirection.

ParameterTypeDefault Value
directionNode<vec3>

Returns

Node<vec3>