Skip to main content

decompress_chunk

Function decompress_chunk 

Source
pub fn decompress_chunk(vxl: &Vxl) -> ChunkUpload
Expand description

Decompress a Vxl chunk into the GPU upload shape, building the full mip ladder (gpu_mip_count(vsid) levels). Caller guarantees vxl is shaped as a roxlap-scene chunk (vsid square). If vxl already carries at least that many mips (the common scene path — the bake generates 6), they are read directly; otherwise the chunk is cloned and re-mipped so the upload always carries a deterministic, vsid-uniform level count.

mips[0] is the legacy mip-0 data, also mirrored into the top-level ChunkUpload fields for the older single-chunk / single-grid paths.