← All resources

The Art Of Packing Data

Auto-discovered

Blog Intermediate

redorav

Visit resource ↗

Description

The Art Of Packing Data is a long technical blog post by redorav on The Code Corsair. The URL is one article on packing game and shader data into compact bit layouts, not general compression codecs.

It covers UNORM and SNORM packing with HLSL examples and RDNA instruction counts, Shader Model 6.6 pack_u8 and pack_s8, bitfield structs for flags, emulated bitfield extract and insert, and small floats such as half, RG11B10F, and RGB9E5F, including NaN and denormal pitfalls. Later sections pack world positions and normals with encode and decode patterns. Radeon Graphics Analyzer snippets compare hand-written versus intrinsic paths.

The audience is intermediate graphics and engine programmers who write HLSL-like shaders and care about bandwidth. Comfort with binary layouts and D3D-style formats is assumed.

The post is free HTML with code and assembly tables. Reader comments add corrections and platform notes.

It is a practical reference when choosing bit widths for colors, normals, and custom GPU payloads.