This node represents an operation that packs floating-point values of a vector into an unsigned 32-bit integer
Constructor
new PackFloatNode(encoding, vectorNode)| Parameter | Type | Default Value |
|---|---|---|
| encoding | "snorm" | "unorm" | "float16" | — |
| vectorNode | Node | — |
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| vectorNode | Node | — | |
| encoding | string | — | |
| isPackFloatNode | boolean | — | |
| Method | Type | |
|---|---|---|
| generateNodeType | () => string | |
| generate | (builder: any) => string | |
Extends
TempNodeConverts 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)
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<vec2> | — |
Returns
NodeConverts 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)
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<vec2> | — |
Returns
NodeConverts each component of the vec2 to 16-bit floating-point values. The results are packed into a single unsigned integer.
| Parameter | Type | Default Value |
|---|---|---|
| value | Node<vec2> | — |
Returns
Node