Commit Graph
2 Commits
Author SHA1 Message Date
adminandClaude Fable 5 2a59a32705 Clip hero cutout in MotionVectors pass to fix HTrace depth corruption
The MotionVectors pass (drawn by HTrace and URP against the real camera
depth buffer) was stock URP: no cutout clip and ZWrite on, so it wrote
the wall depth back into the hole after opaques. The skybox then failed
the depth test there (black disc) and all screen-space effects
(SSAO/GI) shaded the hole with the occluded wall's depth.

The pass now runs ApplyHeroCutout before URP's fragment entry point.
ObjectMotionVectors.hlsl forces its own entry via include_with_pragmas,
so the pragmas are declared explicitly and the file is plain-included.
Complements the earlier GBuffer clip; XR MV pass and ShadowCaster stay
stock on purpose. Includes render-queue churn on the occluder material.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 18:33:25 +02:00
adminandClaude Opus 4.8 ac25f59232 Add radial hero-cutout shader for third-person camera
Reveal the player when geometry sits between the orbit camera and the
character: a screen-space circular mask in a URP/Lit clone (HeroCutoutLit)
clips occluders in front of the player, depth-gated so only geometry nearer
than the hero is cut. The cutout lives outside UnityPerMaterial (SRP batcher
intact) and is a no-op when disarmed, so occluders look identical to URP/Lit.

A runtime driver (HeroCutout.cs on Main/GameManager) feeds the player's
screen position, radius, feather and depth into global shader properties and
only arms while the third-person orbit vcam is live; it disarms in
first-person, free-cam and the pause menu. Applied to the lobby walls via a
dedicated occluder material (floor left solid). Shipped but shelved for now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 17:18:32 +02:00