Skip to content

Lumen follow-up: multi-bounce GI via WSRC feedback #25

@proggeramlug

Description

@proggeramlug

Ticket 014 V14 already gives us effectively 2-bounce GI on HW-RT adapters: V3 Mesh Cards are shadow-aware per-frame lit (bounce 1) → V14 WSRC bake ray-traces into the pre-lit card atlas (bounce 2) → SSGI probe rays sample WSRC on miss (bounce 3, indirect on-screen). But this is a one-shot chain — infinite bounce would require WSRC to be lit from itself.

Approach

  • In V14's WSRC_BAKE_HW_WGSL, on ray hit at a card: instead of sampling ONLY the pre-lit card atlas, also add sample_wsrc(hit_pos, hit_normal) × albedo from the card's albedo atlas + WSRC evaluated at the hit point.
  • This creates a feedback loop — each WSRC bake integrates the previous WSRC's radiance at card-hit points. Over several frames the EMA converges to multi-bounce equilibrium.

Risks

  • Uncontrolled feedback = runaway brightness. Need energy conservation: WSRC contribution at hit should be clamped to 1.0 / (1.0 - mean_albedo) or similar.
  • Firefly propagation — a bad outlier in WSRC gets multiplied each bake. Need strong firefly clamping per-texel.

When to do this

  • If the scene has strongly-coloured bounce that's currently lost after the first bounce (e.g., red rug bouncing onto white ceiling should stay red after 2-3 bounces; currently goes neutral).
  • After the refinement probe layer (issue Lumen follow-up: variance-driven refinement probe layer #20) lands — stable baseline makes the feedback loop less fragile.

Scope

  • WSRC_BAKE_HW_WGSL: add card_albedo_atlas binding + WSRC sample at hit.
  • Energy-conservation clamp parameter in the bake uniform.
  • Convergence test (capture the same frame over 10-20 frames to verify it stabilises).

Natural follow-up to ticket 014; not a blocker for any current quality gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions