Viewer: weapon parts in the colours of their material presets #114
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!114
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/114/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-24 04:02 UTC · original
holdmysocks:claude/weapon-colours→master· +88 −15 · 4 files · 2 commits · merged 2026-11-24 04:11 UTCWhat this changes
weaponmaterials take the base colours of the part's layered-material preset (weapon library,matlib). The sub-material is picked per texel from amaterialidtexture when the material binds one, else per vertex from the green byte of the raw colour stream (value / 4), applied as a vertex tint. The model info lists the preset used per part (weapon_presets) and a note on what is not applied.Index::add_weapon_files, used bysixng materialsand byload_or_build). Before, an index that the viewer built itself had no weapon models in it. This commit was pushed to #110's branch just after it merged, so it is here instead.What was checked
materialidtexture, so the per-vertex path is the one weapons use.--gpu radeon): the pistol comes out with a black frame, dark brown grips and bare steel barrel and trigger; the rifle near black, as its presets say.cargo test -p sixng-core: passes.cargo check -p sixng-guiand a release build of the viewer: pass.What is not done / not known