Keep alpha-coverage mips separate from blended texture uses #804

Closed
TheSlowly wants to merge 0 commits from TheSlowly/Slipstream:alpha-coverage-blend-fix into main
Contributor

Alpha-coverage mips are built per texture, so a texture used by both a masked and a blended material gets the coverage chain for both. The blended uses then look washed out at distance (avatar eyes are an example). Masked surfaces still need the coverage chain for grass, leaves and hair

Textures now get separate GPU images and disk-cache entries for masked and non-masked uses:

  • Masked uses get the coverage-preserving chain, as before
  • Other uses get ordinary mips
  • A second image is only created when a texture is used both ways
  • Blend state is part of the material identity, so blended faces that still carry a mask cutoff also get ordinary mips
  • Cache files are keyed by UUID plus mip policy, and a file with the wrong policy is rejected
  • Decode demand is tracked per variant

The coverage builder, highest-cutoff policy and server-bake exclusion are unchanged

Fixes #766

Alpha-coverage mips are built per texture, so a texture used by both a masked and a blended material gets the coverage chain for both. The blended uses then look washed out at distance (avatar eyes are an example). Masked surfaces still need the coverage chain for grass, leaves and hair Textures now get separate GPU images and disk-cache entries for masked and non-masked uses: - Masked uses get the coverage-preserving chain, as before - Other uses get ordinary mips - A second image is only created when a texture is used both ways - Blend state is part of the material identity, so blended faces that still carry a mask cutoff also get ordinary mips - Cache files are keyed by UUID plus mip policy, and a file with the wrong policy is rejected - Decode demand is tracked per variant The coverage builder, highest-cutoff policy and server-bake exclusion are unchanged Fixes #766
Resolve separate GPU images and disk-cache entries for masked and plain
uses of a texture. Keep blend routing in material identity so faded mask
faces also use ordinary mips. Preserve the existing coverage builder,
highest-cutoff policy and server-bake exclusion.

Keep a variant's outstanding decode demand active when the other variant
is already resident. Asset fetches and compression facts remain shared.
Owner

Merged into release/1.3 (169c840eb9), the 1.3 stable line, so it ships in the next 1.3 release. Your commit is kept as-is with your authorship. It's also on the development branch and will reach main with the next merge there.

Reviewed and tested: the cache key / header flag, per-variant decode demand and the material-identity change all check out, and old coverage-mipped cache files are correctly rejected for blended uses. A test-box run showed no cache rejections, errors or frame-time cost, with the _mask variants written only for textures used both ways.

Thank you for tracking this down and fixing it properly. Closing as merged via release/1.3.

Merged into `release/1.3` (169c840eb9), the 1.3 stable line, so it ships in the next 1.3 release. Your commit is kept as-is with your authorship. It's also on the development branch and will reach `main` with the next merge there. Reviewed and tested: the cache key / header flag, per-variant decode demand and the material-identity change all check out, and old coverage-mipped cache files are correctly rejected for blended uses. A test-box run showed no cache rejections, errors or frame-time cost, with the `_mask` variants written only for textures used both ways. Thank you for tracking this down and fixing it properly. Closing as merged via `release/1.3`.
sky_line closed this pull request 2026-10-18 02:02:21 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream!804
No description provided.