---
title: "unpack4x8unorm(): IR builder function in typeshade/core/ir"
description: "unpack4x8unorm, an IR builder function in typeshade/core/ir. Unpack a u32 RGBA8 into a vec4<f32>."
url: https://typeshade.dev/api/unpack4x8unorm/
language: en
---

# `unpack4x8unorm()`

Function in Builtins

Unpack a `u32` RGBA8 into a `vec4<f32>`.

`import { unpack4x8unorm } from 'typeshade/core/ir'`

This export returns an IR node. A `"use typeshade"` file calls the builtin itself: [`unpack4x8unorm()`](https://typeshade.dev/reference/functions/unpack4x8unorm/)

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

## Syntax

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

## Parameters

**`v` `ReadonlyNode<'u32'>`**

## Return value

`Node<'vec4<f32>'>`

## Targets

| Target | Support | Notes |
| --- | --- | --- |
| 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. |

## See also

- [`unpack4x8unorm()`](https://typeshade.dev/reference/functions/unpack4x8unorm/)

## Source

[`src/core/ir/node.ts`, line 1634](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L1634), at commit af54ddad5
