unpack4x8unorm
On this page

unpack4x8unorm

Function

Unpacks the four bytes of a u32 into a vec4 of values in [0, 1], the low byte into component 0.

The signature and the sentence under each name are the compiler's own text at commit 26de7be8.

Syntax

declare function unpack4x8unorm(a0: u32): vec4
declare function unpack4x8unorm(e: u32): vec4

Parameters

Return value

vec4

Description

The inverse of pack4x8unorm.

Targets

WGSL
unpack4x8unorm(a)
GLSL ES 3.00
(vec4(uvec4(a, a >> 8, a >> 16, a >> 24) & 0xFFu) / 255.0)

Examples

See also

Edit this page Report a problem