Blended decal layers flicker against near-coplanar surfaces under TAA / FSR jitter (metric depth tolerance) #731
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#731
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Seen (owner + user video): an alpha-blended "onion skin" layer on a road mesh (mostly baked AO, less than 1 mm above the road) flickers against the road. With the camera still it flashes every frame; turning TAA / FSR off stops it. It doesn't happen in Alchemy (GL), and the asset owner reports it on every Slipstream version.
Cause (confirmed by test): the layer is so close to the road that the two are effectively tied in depth. SL's mesh format quantizes positions to a per-face 16-bit lattice, and the two layers are triangulated differently. Our blended pass tests "nearer or equal" against the opaque pre-pass depth, the same as LL's GL_LEQUAL. LL renders without camera jitter, so its result is stable. TAA / FSR jitter moves the raster sample points every frame, so near-ties flip pixel by pixel and the layer flashes.
Fix (option 2, chosen): a metric depth tolerance in the blended fragment shaders. The blended pass reads the opaque depth from the pre-pass and treats any blended fragment within a small world-space distance of the opaque surface as in front. Beyond the tolerance it is discarded as hidden.
Test: the road asset with TAA / FSR on, camera still and moving; blended windows and particles just behind walls (no leaks); glass and water edges; HUD unaffected; snapshots.
Fixed on main: a metric depth tolerance for alpha-blended surfaces (RenderVKBlendDepthTol*, default 4 mm + 0.1 mm/m, grazing-angle scaled). Confirmed by the owner on the reported road asset with TAA / FSR on. Closes when the next beta ships.
Fixed in 1.3.0 Beta 8 (
v1.3.0-beta.8). Thanks for the report!