Tattoos: mask layers fade or cut the layer before them #507
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!507
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-507"
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 21:09 UTC · original
holdmysocks:claude/tattoo-masks-385→master· +106 −20 · 2 files · 2 commits · merged 2026-11-27 21:19 UTCPart of #385: tattoo mask layers.
A decoration layer with flag 0x4 isn't drawn itself. It masks the layer before it in the same record. This was decoded from the game's bake pixel shader (
PS_BakeDecorations). After it works out a layer's coverage, the shader looks at the next layer in the record. If that layer has bit 0x4, the shader:aat its own UV (its layer matrix, applied to the record-space UV);1 - a) when flag 0x80000000 is set;1 - (1 - a) x opacity, using the mask layer's opacity;In the data, all 720 layers with this bit come right after an ordinary layer in their record. Until now the bake drew them as layers (the 206 with ink, in their ink colour) or dropped them as uncoloured masks. They now fade or cut the tattoo they belong to. For example, cs_lori's roses come out partly faded where their masks say so.
What changes:
peddeco::maskedpairs each layer with the mask that follows it, within one record.bakeapplies the mask factor to the layer's coverage.Tests cover pairing (a mask opening a record is drawn as a layer), the mask factor with and without inversion, and a masked bake.
Still open on #385: what flag bits 0x8 and 0x10 do (the bake shader doesn't test them), the per-texel region mask, Lucia's script-applied set and the tone override.