#1471: Fully transparent rigged faces cast no ray-traced shadows #1472

Open
TheSlowly wants to merge 1 commit from TheSlowly/Slipstream:rt-rigged-tint-cull-1471 into main
Collaborator

Fixes #1471. Ray-traced shadows already drop blend faces at 100% transparency, but only for unrigged rows. Rigged faces (mesh body hidden parts, bento parts of attachments) went through the rig plan, which never checked tint, so they kept blocking light. One worn attachment left a hard dark patch on the wearer under "Shadows from all lights". The rig plan now applies the same rule (shared header), and re-plans when a face crosses the cutoff or the setting changes. Verified in world: the patch is gone.

Fixes #1471. Ray-traced shadows already drop blend faces at 100% transparency, but only for unrigged rows. Rigged faces (mesh body hidden parts, bento parts of attachments) went through the rig plan, which never checked tint, so they kept blocking light. One worn attachment left a hard dark patch on the wearer under "Shadows from all lights". The rig plan now applies the same rule (shared header), and re-plans when a face crosses the cutoff or the setting changes. Verified in world: the patch is gone.
A worn mesh body's hidden sections (faces at 100% transparency) darkened
the wearer's own clothes under ray-traced local-light shadows (ReSTIR DI),
while the shadow maps ignored them.

RenderVKRTBlendCull removes such faces from the TLAS in pass A. A rigged
row, though, leaves pass A before its record is written; its geometry
reaches the TLAS through the CPU rig plan (the group BLAS and pass B's
cluster-switched records), which never applied the rule. A debug build
confirmed it in world: the first committed caster at the dark patch was a
rigged BLEND face with tint alpha 0 (flags 0x2003), and no walk hit the
candidate cap.

The rule now lives in one place, llcleanrtblendcull.h invisibleFace.
Pass A's GLSL mirrors it. The rig plan walk skips rigged rows that match
it, before either candidate push, so they get no group geometry and no
cluster-switched record. rowSig carries the row's verdict, so a tint that
crosses the cutoff (pushTint from a mesh body HUD, through the store's
dirty runs) re-plans once. A fade that stays on one side of the cutoff
does not. The setting is mixed into the plan key. The re-plan is the
existing C3 plan walk, run only on frames where a verdict changes. Only
the affected groups' BLAS are rebuilt, and nothing new runs per frame.

Test-Plan:
    clang++ -std=c++20 -I.. rt_blend_cull_checks.cpp && ./a.out
    (in indra/newview/vkgfx/tests): the predicate's cases, including
    rigged / self / fullbright / terrain / water, the 1/255 edge and NaN.
    python3 indra/newview/vkgfx/tests/rt_blend_cull_source_checks.py
    checks that the rig plan applies the rule before both candidate
    pushes, that rowSig hashes the verdict, that the plan key carries the
    setting, and that pass A mirrors the constants.
    Shader regen (regen_world_spv.py) and spirv-val on every variant;
    clang-cl /Zs on llcleanrtvk.cpp with the Windows flags.
    In world: wear a mesh body with hidden (tint 0) sections, ReSTIR DI 3
    and RenderVKProjectorShadows 2. The shadow patch under the hidden
    sections is gone with RenderVKRTBlendCull 1 and comes back with 0.
    Toggle a section with the body's HUD and check that the shadow
    follows within a frame or two, with no hitch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TheSlowly force-pushed rt-rigged-tint-cull-1471 from 8405e4d831 to b0876ba166 2026-11-08 19:05:57 +00:00 Compare
This pull request has changes conflicting with the target branch.
  • indra/newview/vkgfx/llcleanrtvk.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u rt-rigged-tint-cull-1471:TheSlowly-rt-rigged-tint-cull-1471
git switch TheSlowly-rt-rigged-tint-cull-1471
Sign in to join this conversation.
No reviewers
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!1472
No description provided.