PackFloatNode

Last modified: Aug 16, 2026

This node represents an operation that packs floating-point values of a vector into an unsigned 32-bit integer

Constructor

new PackFloatNode(encoding, vectorNode)
ParameterTypeDefault Value
encoding"snorm" | "unorm" | "float16"—
vectorNodeNode—
AccessorType

Properties

PropertyTypeDefault Value
vectorNodeNode—
encodingstring—
layout"2x16" | "4x8"—
isPackFloatNodeboolean—
MethodType

Extends

TempNode

packSnorm2x16

Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer. round(clamp(c, -1, +1) * 32767.0)

ParameterTypeDefault Value
valueNode<vec2>—

Returns

Node

packUnorm2x16

Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer. round(clamp(c, 0, +1) * 65535.0)

ParameterTypeDefault Value
valueNode<vec2>—

Returns

Node

packHalf2x16

Converts each component of the vec2 to 16-bit floating-point values. The results are packed into a single unsigned integer.

ParameterTypeDefault Value
valueNode<vec2>—

Returns

Node
N E W

packSnorm4x8

Converts each component of the normalized float to 8-bit integer values. The results are packed into a single unsigned integer.

ParameterTypeDefault Value
valueNode<vec4>—

Returns

Node
N E W

packUnorm4x8

Converts each component of the normalized float to 8-bit integer values. The results are packed into a single unsigned integer.

ParameterTypeDefault Value
valueNode<vec4>—

Returns

Node