Blend layers: front layer lit from resolved visibility, deeper layers budgeted (RenderVKBlendHitLighting cost) #1623

Closed
opened 2026-11-19 11:49:22 +00:00 by TheSlowly · 1 comment
Collaborator

RenderVKBlendHitLighting traces up to ~10 rays per blended layer per frame (8 local-light shadow rays, the sun, one occlusion ray) with no history. Measured 2026-11-18 in a town scene (DLSS Quality, 1440p): ~5.1 ms/frame (35.3 -> 30.2 ms with it off) at ~3 blended layers per pixel.

Plan (front-layer split as used for translucent reflections, extended to shadows):

  • Pass 14 (RT forward) resolves, per half-res texel of the front blend layer and over frames, its sun visibility, its local lights' shadowed / unshadowed ratio (same picks twice) and its occlusion ray; the FS lights the front layer with its own unshadowed walk x that ratio, no rays.
  • A layer behind it whose visible weight (alpha x (1 - front alpha)) is under RenderVKBlendLayerReuse takes the front layer's terms; the rest keep their own rays. Presets set the threshold (Ultra 0).

Settings: RenderVKBlendFrontLight (A/B), RenderVKBlendLayerReuse. Related: #1499 (cache cells for blend layers).

RenderVKBlendHitLighting traces up to ~10 rays per blended layer per frame (8 local-light shadow rays, the sun, one occlusion ray) with no history. Measured 2026-11-18 in a town scene (DLSS Quality, 1440p): ~5.1 ms/frame (35.3 -> 30.2 ms with it off) at ~3 blended layers per pixel. Plan (front-layer split as used for translucent reflections, extended to shadows): - Pass 14 (RT forward) resolves, per half-res texel of the front blend layer and over frames, its sun visibility, its local lights' shadowed / unshadowed ratio (same picks twice) and its occlusion ray; the FS lights the front layer with its own unshadowed walk x that ratio, no rays. - A layer behind it whose visible weight (alpha x (1 - front alpha)) is under RenderVKBlendLayerReuse takes the front layer's terms; the rest keep their own rays. Presets set the threshold (Ultra 0). Settings: RenderVKBlendFrontLight (A/B), RenderVKBlendLayerReuse. Related: #1499 (cache cells for blend layers).
TheSlowly added this to the Slipstream project 2026-11-19 11:49:22 +00:00
Author
Collaborator

Done: PR #1630, merged in fedb692509.

Done: PR #1630, merged in fedb692509.
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#1623
No description provided.