unpack4x8unorm
On this page

unpack4x8unorm()

Function in Builtins

Unpack a u32 RGBA8 into a vec4<f32>.

import { unpack4x8unorm } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const unpack4x8unorm: (v: ReadonlyNode<"u32">) => Node<"vec4<f32>">

Parameters

v ReadonlyNode<'u32'>

Return value

Node<'vec4<f32>'>

Targets

TargetSupportNotes
WGSL (WebGPU) Supported

unpack4x8unorm(v).

GLSL ES 3.00 (WebGL2) Supported

(vec4(uvec4(v, v >> 8, v >> 16, v >> 24) & 0xFFu) / 255.0).

CPU oracle Supported

Evaluated in f64 by the oracle.

Source

src/core/ir/node.ts, line 1877, at commit 26de7be8

Edit this page Report a problem