GI: fresh ray directions are white noise (the R2 sequence has no effect) #1611

Closed
opened 2026-11-18 15:32:12 +00:00 by TheSlowly · 1 comment
Collaborator

giFreshRay (clean_deferred_light.comp) seeds its per-texel hash with the frame number and then adds the R2 step for that frame. Because the seed already changes every frame, each frame's ray direction is independent white noise and the R2 term does nothing, so a texel's rays don't cover its hemisphere evenly over time and GI history converges slower than it should.

Fix: hash the texel only (a fixed per-texel rotation) and step R2 by frame, in 32-bit fixed point, the way rtrLobeDir already does for RT reflections.

Found in a read-through of the denoising / noise paths.

`giFreshRay` (clean_deferred_light.comp) seeds its per-texel hash with the frame number and then adds the R2 step for that frame. Because the seed already changes every frame, each frame's ray direction is independent white noise and the R2 term does nothing, so a texel's rays don't cover its hemisphere evenly over time and GI history converges slower than it should. Fix: hash the texel only (a fixed per-texel rotation) and step R2 by frame, in 32-bit fixed point, the way `rtrLobeDir` already does for RT reflections. Found in a read-through of the denoising / noise paths.
TheSlowly added this to the Slipstream project 2026-11-18 15:32:13 +00:00
Owner

Shipped in 1.6.0 Beta 4.

Shipped in 1.6.0 Beta 4.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#1611
No description provided.