directionToColor

Last modified: Nov 18, 2025

Packs a direction vector into a color value.

ParameterTypeDefault Value
nodeNode<vec3>

Returns

Node<vec3>

colorToDirection

Unpacks a color value into a direction vector.

ParameterTypeDefault Value
nodeNode<vec3>

Returns

Node<vec3>

unpackNormal

Unpacks a tangent space normal, reconstructing the Z component by projecting the X,Y coordinates onto the hemisphere. The X,Y coordinates are expected to be in the [-1, 1] range.

ParameterTypeDefault Value
xyNode<vec2>

Returns

Node<vec3>