Vehicles: metalness and palette position from the paint shader's reading #76
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!76
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/76/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-23 20:02 UTC · original
holdmysocks:claude/paint-shader→master· +99 −52 · 5 files · 1 commits · merged 2026-11-23 20:18 UTCReplaces two guesses in the vehicle part colours with what the paint shader does.
Source
The G-buffer pixel shader of
standard_vehicle_2lyrwas read from its machine code in a separate piece of work outside this repository. No code from that work or from its tools is in this change.Metalness
lyr0materialatex, and the roughness pair by its green channel.307f162c.f763652d/09dd33c1, besideroughnessLow/roughnessHigh. It is 0 on plastics, rubber, leather and paint and 0.7 to 1.0 on chrome and bare metal (60 of 99 records are 0, 30 are 0.9 or more).Position along a palette row
lyr0diffusetex, a gradient-position map, plus a small detail term. It reads the palette only where the part's own colour is zero.Formats
COLOR_0alpha on part-coloured materials: 254 = primary body paint, otherwise metalness in four steps x 50 + roughness in 50 steps.vehicle_parts.jsonis format 8; exports are version 6, so the viewer exports vehicles again.Checked
Not done