Skip to main content

build_rgba_lut

Function build_rgba_lut 

Source
pub const fn build_rgba_lut(palette: PpuPalette) -> [[u8; 4]; 512]
Expand description

v2.8.0 Phase 4 — build the 512-entry (emphasis << 6) | color → RGBA8 lookup the PPU’s pixel-emit path uses.

Emphasis bit layout matches PPUMASK bits 7-5 shifted down: bit 0 = red, bit 1 = green, bit 2 = blue. Built from palette_color_to_rgba (the exact function the per-pixel path used to call), so the table is byte-identical to the direct computation by construction.