Viewer: the primer's metalness and roughness blended by the material map #362
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!362
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/362/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-26 06:25 UTC · original
holdmysocks:primer-surface→master· +21 −13 · 2 files · 2 commits · merged 2026-11-26 06:38 UTCThe viewer now uses the game's primer metalness and roughness instead of a fixed midpoint.
What the game does
primerPaletteinto four bytes: metallicLow, metallicHigh, roughnessLow and roughnessHigh. Each value is multiplied by 255 and truncated.Changes
primer_surfacereturns all four bytes. Metal low/high stay in coat-row columns 32/33. Rough low/high go into the new columns 48/49.mat_blend, which defaults to 0.5 when a part has no material map.primerPaletteand an empty one (defaults 0/0/0.6/0.6).Checks