unpack4x8snorm
Function
Unpacks the four bytes of a u32 into a vec4 of values in [-1, 1], reading each as a signed byte, 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 unpack4x8snorm(a0: u32): vec4declare function unpack4x8snorm(e: u32): vec4Parameters
-
eu32
Return value
Description
The inverse of pack4x8snorm.
Targets
- WGSL
-
unpack4x8snorm(a) - GLSL ES 3.00
-
max(vec4(ivec4(uvec4(a, a >> 8, a >> 16, a >> 24) << 24) >> 24) / 127.0, vec4(-1.0))