Tattoo bake: limit a region-flagged record to the part's mesh #539
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!539
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-539"
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-28 05:13 UTC · original
holdmysocks:claude/tattoo-region-mask-385→master· +197 −5 · 2 files · 1 commits · merged 2026-11-28 05:23 UTCPart of #385: the per-texel region mask for decorations.
A decoration record with a layer flagged 0x2 limits every layer to the part's own mesh. I traced this through the game's bake.
MSNC_VS_BakeDecorations). If any layer in the record has 0x2, it sets a per-vertex z: 1 when the mask texels at (x-1, y-1), (x-1, y), (x, y+1) and (x+1, y+1) all lie on the mesh, else 0. z is interpolated over each triangle.PS_BakeDecorations). A layer's coverage starts at min(opacity, z).What changes:
peddeco::region_capbuilds that cap from the part's triangles, in the layout the texture is baked in (TEXCOORD_1 on the upper body, from #530). Gutter texels take their covered neighbours' value.bake_cappedlowers a layer's coverage only where the cap is below its opacity.bakeis unchanged for records without the flag.Left out: flag 0x40. In a record without 0x2, it has the shader take z from a vertex colour channel picked by the layer's group. On the characters checked, applying it faded a whole tattoo (the guardia's teal torso piece in outfits 17 and 37) to about 6%, so I'm not confident it's read correctly. It is not applied.
Reach: 3 of the 7,509 records carry 0x2. All three are head records (85 layers) on mesh-less face items in four generic ped wardrobes. Andy, Viper and the guardia (outfit 17) bake byte-identical textures before and after.
Tests:
Still open on #385: