Textures: untile uncompressed mip chains as SW_4KB_S, tail included #263
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!263
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/263/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-25 12:12 UTC · original
holdmysocks:six-mipchain→master· +51 −22 · 2 files · 3 commits · merged 2026-11-25 12:56 UTCFollow-up to PR 257 (merged).
Uncompressed textures with a mip chain were read as 16×16-element tiles at the block-compressed mip offsets. They are stored in the Gfx10 SW_4KB_S chain layout, packed mip tail included, so mip 0 and the smaller mips decoded scrambled in PNG export, DDS export and the viewer.
Change
uncompressed_layoutintexture.rscovers uncompressed single-mip 2/4-byte textures (from PR 257) and every uncompressed texture with a mip chain.mip0_linearandmip_linearuntile through it.exportable_mipsreturns the whole chain for these textures, so DDS export writes all mips. Block-compressed textures are unchanged and still stop above their packed tail.Checks on the install
These are all the uncompressed textures with a mip chain in textures.rpf, data.rpf, levels, common and the packs. Mip k+1 was compared with mip k averaged 2×2:
coronageneric_instruments_i8b,_i7vit_montagne_i3puddle_layout1causticfognoisecaustic's smaller mips hold a finer caustic pattern rather than a downsample. Every other block offset for mip 3 matches worse (6–14 dB against 22 dB), so the placement is right and the difference is in the content.cargo check --workspace --all-targetsandcargo test -p sixng-core -p sixng-gui --releasepass.