PackFloatNode

Last modified: Mar 5, 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
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