RT: opacity micromaps (VK_EXT_opacity_micromap) for hardware alpha-tested shadows, shader alpha-test fallback #194
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#194
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?
Hardware alpha testing for ray-traced shadows via opacity micromaps (
VK_EXT_opacity_micromap), with the current shader alpha test kept as the fallback so every RT card still works.Why
Ray-traced sun shadows (#185) with the per-leaf alpha test cost ~2.4 ms vs cascades on an RTX 5090 (same view: 14.8 -> 17.2 ms); ~1.3 ms of that is the candidate alpha test -- every alpha-mask triangle a ray crosses returns to the shader for a texture fetch (clean_rt_common.glsl
traceShadowRay/rtCandidateAlpha). Skipping it at distance (RenderVKRTSunAlphaDist) makes leaf cards shadow as solid rectangles (black rings around canopies). Projector RT shadows and the RT debug views pay the same cost.Approach
vkCmdBuildMicromapsEXT, attach viaVkAccelerationStructureTrianglesOpacityMicromapEXT.Fallback (must keep)
Devices / drivers without
VK_EXT_opacity_micromap(RTX 20/30, RX 6000/7000, many Linux drivers) keep today's path: candidate alpha test in the shader,RenderVKRTSunAlphaDistavailable as the performance knob. Detect at device init; log which path is active; About window notes it alongside the RT status.Done when
Ray-traced sun shadows with leaf-accurate foliage cost about what opaque-only rays do on OMM hardware, identical images to the shader path, and no regression on non-OMM RT cards.
Related: #185 (RT sun / moon), #85 (denoiser), #164 (RT VRAM budget), #157 (RT build cost).
Status check (verification sweep): opacity micromaps shipped in v0.14.0-beta.1 (
f1959b9546). They cover static and worn-rigid alpha-mask geometry, with a startup self-test and the shader alpha test as fallback (RenderVKRTOpacityMicromaps, RenderVKRTOmmMaxLevel). Still open, per the commit: rigged alpha-mask geometry is not covered yet.Status 2026-10-05: shipped for static and worn-rigid alpha-mask geometry (
f1959b9546). Left open for the remaining scope: rigged alpha-mask geometry.Done: opacity micromaps are live for RT alpha-tested shadows (shader alpha test kept as fallback). VRAM follow-up: #580.