Tint palettes: row layout from the game's mesh shader (SIX-41) #432
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!432
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-432"
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-27 01:48 UTC · original
holdmysocks:six41-tint-layout→master· +29 −11 · 3 files · 1 commits · merged 2026-11-27 02:57 UTCSIX-41: the row rule for tint palettes, read from the game's prop mesh shader (MS_VS_TransformD_c5fd36bb).
The shader rule: with k = width & 7, each row holds 256 >> k entries, there are width >> (8 − k) rows, and the entry read is min(tint, rows − 1) × (256 >> k) + round(255 × COLOR0.b).
texture::tint_layoutnow computes the shader rule directly. Where the rule gives no whole row, it falls back to one row of the full width. Among the palette widths in use, only width 32 (7 palettes) hits that fallback, so it keeps the layout it had before.tint_rowdocs (placements) and the model.jsonappliedtext now say the clamp at rows − 1 is the game's, not an assumption.Follow-up for the tint weight the pixel shader applies: SIX-245.