Texture compression punches speckle holes into alpha-masked surfaces (e.g. a two-sided trading card); cutout edges also break #840

Closed
opened 2026-10-18 05:53:16 +00:00 by sky_line · 2 comments
Owner

Alpha-coverage mips (RenderVKAlphaCoverageMips, default on) punch scattered black speckle holes into some textured surfaces at certain distances.

Repro (owner): a trading-card item: a thin mesh with a face on each side, each with its own texture. At one zoom level it looks correct. Zooming in one more click, the front face fills with dark speckles that follow the texture detail (text, edges, hair), with the dark back face showing through. Not shadows, not FSR, not TAA (each ruled out). Not the slim G-buffer VS. Setting RenderVKAlphaCoverageMips 0 fixes it. Screenshots below.

Likely causes (to confirm)

  • Coverage scaling leaves many texels at alpha ~= cutoff; BC compression error (BC3 / BC7 alpha) then pushes some of them below it, so they are discarded and hole out. Coverage alpha must keep a margin from the cutoff that covers the encoder's alpha error, or the coverage scale should be computed on the decoded (post-compression) values.
  • The top mip(s) shouldn't be modified at all: if mip 0 or mip 1 gets coverage-adjusted, a mostly-opaque texture gets holes exactly when the camera gets close (residency upgrades / lower mips). Check which levels are adjusted.
  • Nearly opaque textures (alpha mostly 255, small semi-transparent areas, or an alpha channel holding non-coverage data) shouldn't get a coverage chain at all. Skip when the source's coverage at the cutoff is ~100%.
  • Check the interaction with the #804 per-variant images (masked uses get the coverage chain) and the highest-cutoff policy (#786).

Expected

Coverage mips keep foliage / hair density at distance without ever turning texels that are opaque at mip 0 into holes, at any distance or compression format.

Correct (one zoom level out):

ok

Speckled (one click closer):

speckle

Alpha-coverage mips (`RenderVKAlphaCoverageMips`, default on) punch scattered **black speckle holes** into some textured surfaces at certain distances. **Repro (owner):** a trading-card item: a thin mesh with a face on each side, each with its own texture. At one zoom level it looks correct. Zooming in **one more click**, the front face fills with dark speckles that follow the texture detail (text, edges, hair), with the dark back face showing through. Not shadows, not FSR, not TAA (each ruled out). Not the slim G-buffer VS. **Setting `RenderVKAlphaCoverageMips` 0 fixes it.** Screenshots below. ### Likely causes (to confirm) - **Coverage scaling leaves many texels at alpha ~= cutoff;** BC compression error (BC3 / BC7 alpha) then pushes some of them below it, so they are discarded and hole out. Coverage alpha must keep a margin from the cutoff that covers the encoder's alpha error, or the coverage scale should be computed on the decoded (post-compression) values. - **The top mip(s) shouldn't be modified at all:** if mip 0 or mip 1 gets coverage-adjusted, a mostly-opaque texture gets holes exactly when the camera gets close (residency upgrades / lower mips). Check which levels are adjusted. - **Nearly opaque textures** (alpha mostly 255, small semi-transparent areas, or an alpha channel holding non-coverage data) shouldn't get a coverage chain at all. Skip when the source's coverage at the cutoff is ~100%. - Check the interaction with the #804 per-variant images (masked uses get the coverage chain) and the highest-cutoff policy (#786). ### Expected Coverage mips keep foliage / hair density at distance without ever turning texels that are opaque at mip 0 into holes, at any distance or compression format. **Correct (one zoom level out):** ![ok](https://git.slipstreamviewer.org/attachments/388b5c34-8430-4a37-8e57-a57e019671ef) **Speckled (one click closer):** ![speckle](https://git.slipstreamviewer.org/attachments/f0c69503-2cd5-4f2f-af26-c20a8422f047)
sky_line added this to the Slipstream project 2026-10-18 05:53:16 +00:00
Author
Owner

Correction from the owner's re-test: coverage mips are not the cause. The fix came from turning off texture compression (RenderVKTextureCompression 0). The earlier coverage-mips result was a mix-up (the texture hadn't re-uploaded yet).

Revised:

  1. Speckles across the card: fixed by texture compression off. The encoded version of this alpha-masked texture has alpha errors that cross the cutoff at fine detail, so those texels are discarded. Look at the encoder's choice and alpha precision for masked textures (adaptive encoding, BC1 punch-through, BC3 / BC7 modes).
  2. Holes along the card's cutout edge (the white table behind shows through, scattered): persist with compression on or off and coverage mips off. So this is in the alpha test at the edge (mip / LOD choice for the alpha test, #648), or ordinary alpha-test aliasing. To be compared with another viewer.
**Correction from the owner's re-test: coverage mips are not the cause.** The fix came from turning off **texture compression** (`RenderVKTextureCompression` 0). The earlier coverage-mips result was a mix-up (the texture hadn't re-uploaded yet). Revised: 1. **Speckles across the card:** fixed by texture compression off. The encoded version of this alpha-masked texture has alpha errors that cross the cutoff at fine detail, so those texels are discarded. Look at the encoder's choice and alpha precision for masked textures (adaptive encoding, BC1 punch-through, BC3 / BC7 modes). 2. **Holes along the card's cutout edge** (the white table behind shows through, scattered): persist with compression on or off and coverage mips off. So this is in the alpha test at the edge (mip / LOD choice for the alpha test, #648), or ordinary alpha-test aliasing. To be compared with another viewer.
sky_line changed title from Alpha-coverage mips punch speckle holes into some surfaces (e.g. a two-sided trading card) when zoomed in to Texture compression punches speckle holes into alpha-masked surfaces (e.g. a two-sided trading card); cutout edges also break 2026-10-18 05:56:14 +00:00
Author
Owner

Fixed in Slipstream 1.3.0 (stable): https://git.slipstreamviewer.org/sky_line/Slipstream/releases/tag/v1.3.0

If you still see this on 1.3.0, reply here and we'll reopen it.

Fixed in **Slipstream 1.3.0** (stable): https://git.slipstreamviewer.org/sky_line/Slipstream/releases/tag/v1.3.0 If you still see this on 1.3.0, reply here and we'll reopen it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#840
No description provided.