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?)| Parameter | Type | Default Value |
|---|---|---|
| method | string | — |
| aNode | Node | — |
| bNode? | null | Node | null |
Constructs a packed 4x8 integer function node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
| get DOT4_U8_PACKED | string | |
| get DOT4_I8_PACKED | string | |
| get PACK4X_I8 | string | |
| get PACK4X_U8 | string | |
| get PACK4X_I8_CLAMP | string | |
| get PACK4X_U8_CLAMP | string | |
| get UNPACK4X_I8 | string | |
| get UNPACK4X_U8 | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| method | string | — | |
| aNode | Node | — | |
| bNode | null | Node | — | |
| isPacked4x8IntegerNode | boolean | — | |
| Method | Type | |
|---|---|---|
| getInputType | () => "uvec4" | "uint" | "ivec4" | |
| generateNodeType | () => "int" | "uvec4" | "uint" | "ivec4" | |
| _getEmulatedFn | () => Function | |
| setup | (builder: any) => any | |
| generate | (builder: any, output: any) => any | |
| serialize | (data: any) => void | |
| deserialize | (data: any) => void | |
Extends
TempNodeComputes the dot product of four unsigned 8-bit integer components packed into each input.
| Parameter | Type | Default Value |
|---|---|---|
| a | Node<uint> | — |
| b | Node<uint> | — |
Returns
Node<uint>Computes the dot product of four signed 8-bit integer components packed into each input.
| Parameter | Type | Default Value |
|---|---|---|
| a | Node<uint> | — |
| b | Node<uint> | — |
Returns
Node<int>Packs the least significant 8 bits of four signed integers into a uint.
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<ivec4> | — |
Returns
Node<uint>Packs the least significant 8 bits of four unsigned integers into a uint.
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<uvec4> | — |
Returns
Node<uint>Clamps four signed integers to the signed 8-bit range and packs them into a
uint.
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<ivec4> | — |
Returns
Node<uint>Clamps four unsigned integers to the unsigned 8-bit range and packs them
into a uint.
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<uvec4> | — |
Returns
Node<uint>Unpacks a uint into four sign-extended signed 8-bit integer components.
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<uint> | — |
Returns
Node<ivec4>Unpacks a uint into four zero-extended unsigned 8-bit integer components.
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<uint> | — |
Returns
Node<uvec4>