Sun shadows bounce back and forth with a static object and static sun (all sun shadows) #674

Closed
opened 2026-10-11 10:06:39 +00:00 by sky_line · 1 comment
Owner

Owner report (1.3.0 Beta 3 build, ray-traced sun shadows RenderVKSunShadows 2): with a static object and a static sun, its sun shadow bounces back and forth by a small amount. Looking closer, all sun shadows do this. It's a back-and-forth motion, not noise or shimmer, and it can't be seen in a still screenshot.

Suspects, roughly in order

  1. Sun direction oscillating. The environment's sun/moon direction alternates between two values: server-sent vs locally interpolated day-cycle position, environment blending (parcel vs region vs local), or float/quantization round-trips of the sun vector. Check: log the sun direction used by the RT pass every frame for a few seconds and look for flips. Does it stop with a fixed local environment, or with the day cycle paused?
  2. Ping-pong history mismatch in the shadow-mask denoiser. #666 turned on temporal accumulation without TAA (RenderVKRTShadowTemporalAlways) and gave projectors and the sun a new path. Possible causes: alternating history slots holding different reprojection/state; the R2 noise phase or disc rotation alternating between two sets; reprojection with an inconsistent previous-frame camera, so static shadows "swim" by the reprojection error each frame. Test: RenderVKRTShadowTemporalAlways 0, RenderVKRTShadowDenoise 0, RenderVKRTShadowAtrous 0, and TAA on vs off.
  3. Jitter leaking in. TAA/FSR sub-pixel jitter reaching the mask's receiver reconstruction without being undone, or the half-res mask's upsample alternating its sample choice.
  4. Terminator lift / pre-pass triangle data (#664) varying per frame (e.g. a stale or double-buffered target). Test: RenderVKRTShadowTerminatorOffset 0 and RenderVKRTTerminatorSource 0.
  5. Shadow maps, if it also happens with RenderVKSunShadows 1: cascade re-fit / texel snapping (the #567 event cache, RenderVKShadowEventCache, light-move texels).

Repro

Stand still with the camera still. Watch a sharp sun shadow edge from a static object at mid range for several seconds. Toggle the switches above one at a time to find which one stops the motion, and check whether it also happens with RenderVKSunShadows 1.

Owner report (1.3.0 Beta 3 build, ray-traced sun shadows `RenderVKSunShadows 2`): with a **static object and a static sun**, its sun shadow **bounces back and forth** by a small amount. Looking closer, **all sun shadows do this**. It's a back-and-forth motion, not noise or shimmer, and it can't be seen in a still screenshot. ## Suspects, roughly in order 1. **Sun direction oscillating.** The environment's sun/moon direction alternates between two values: server-sent vs locally interpolated day-cycle position, environment blending (parcel vs region vs local), or float/quantization round-trips of the sun vector. Check: log the sun direction used by the RT pass every frame for a few seconds and look for flips. Does it stop with a fixed local environment, or with the day cycle paused? 2. **Ping-pong history mismatch in the shadow-mask denoiser.** #666 turned on temporal accumulation without TAA (`RenderVKRTShadowTemporalAlways`) and gave projectors and the sun a new path. Possible causes: alternating history slots holding different reprojection/state; the R2 noise phase or disc rotation alternating between two sets; reprojection with an inconsistent previous-frame camera, so static shadows "swim" by the reprojection error each frame. Test: `RenderVKRTShadowTemporalAlways 0`, `RenderVKRTShadowDenoise 0`, `RenderVKRTShadowAtrous 0`, and TAA on vs off. 3. **Jitter leaking in.** TAA/FSR sub-pixel jitter reaching the mask's receiver reconstruction without being undone, or the half-res mask's upsample alternating its sample choice. 4. **Terminator lift / pre-pass triangle data (#664)** varying per frame (e.g. a stale or double-buffered target). Test: `RenderVKRTShadowTerminatorOffset 0` and `RenderVKRTTerminatorSource 0`. 5. **Shadow maps, if it also happens with `RenderVKSunShadows 1`:** cascade re-fit / texel snapping (the #567 event cache, `RenderVKShadowEventCache`, light-move texels). ## Repro Stand still with the camera still. Watch a sharp sun shadow edge from a static object at mid range for several seconds. Toggle the switches above one at a time to find which one stops the motion, and check whether it also happens with `RenderVKSunShadows 1`.
sky_line added this to the Slipstream project 2026-10-11 10:06:39 +00:00
Author
Owner

Fixed in 1.3.0 Beta 4: RT sun shadow bounce (exact half-res reprojection), edge pulse (exact sun-motion step), and moving-avatar ghosting (mover persistence, leading-edge snap, capped history, certainty bypass), plus zoom settle. Owner confirmed shadows are much better.

Fixed in **1.3.0 Beta 4**: RT sun shadow bounce (exact half-res reprojection), edge pulse (exact sun-motion step), and moving-avatar ghosting (mover persistence, leading-edge snap, capped history, certainty bypass), plus zoom settle. Owner confirmed shadows are much better.
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#674
No description provided.