N E W

Packed4x8IntegerNode

Last modified: Sep 3, 2026

Represents one of the built-in functions of WGSL’s packed_4x8_integer_dot_product language extension. If the extension is not available, the node falls back to an emulation with plain integer bit operations.

Constructor

new Packed4x8IntegerNode(method, aNode, bNode?)
ParameterTypeDefault Value
methodstring—
aNodeNode—
bNode?null | Nodenull

Constructs a packed 4x8 integer function node.

AccessorType

Properties

PropertyTypeDefault Value
methodstring—
aNodeNode—
bNodenull | Node—
isPacked4x8IntegerNodeboolean—
MethodType

Extends

TempNode
N E W

dot4U8Packed

Computes the dot product of four unsigned 8-bit integer components packed into each input.

ParameterTypeDefault Value
aNode<uint>—
bNode<uint>—

Returns

Node<uint>
N E W

dot4I8Packed

Computes the dot product of four signed 8-bit integer components packed into each input.

ParameterTypeDefault Value
aNode<uint>—
bNode<uint>—

Returns

Node<int>
N E W

pack4xI8

Packs the least significant 8 bits of four signed integers into a uint.

ParameterTypeDefault Value
valueNode<ivec4>—

Returns

Node<uint>
N E W

pack4xU8

Packs the least significant 8 bits of four unsigned integers into a uint.

ParameterTypeDefault Value
valueNode<uvec4>—

Returns

Node<uint>
N E W

pack4xI8Clamp

Clamps four signed integers to the signed 8-bit range and packs them into a uint.

ParameterTypeDefault Value
valueNode<ivec4>—

Returns

Node<uint>
N E W

pack4xU8Clamp

Clamps four unsigned integers to the unsigned 8-bit range and packs them into a uint.

ParameterTypeDefault Value
valueNode<uvec4>—

Returns

Node<uint>
N E W

unpack4xI8

Unpacks a uint into four sign-extended signed 8-bit integer components.

ParameterTypeDefault Value
valueNode<uint>—

Returns

Node<ivec4>
N E W

unpack4xU8

Unpacks a uint into four zero-extended unsigned 8-bit integer components.

ParameterTypeDefault Value
valueNode<uint>—

Returns

Node<uvec4>