Skip to content

Conversation

@JMS55
Copy link
Contributor

@JMS55 JMS55 commented Jan 2, 2026

Objective

  • Greatly reduce light leaks near corners of objects (but doesn't fix general light leaks from tiny geometry)

Solution

To prevent light leaks:

  • When ray_t is smaller than the cache cell size, force the finest LOD cache access.
  • Make LOD much less aggressive
  • Make the finest LOD smaller

Since this then greatly increases the number of cache cells in the scene, I changed the following to prevent too much of a decrease in performance (this PR is still a hit to performance though):

  • Randomly skip updating some cells once we have more than 40,000 cells active
  • Aggressively prune older cache cells

Also some misc changes:

Ideally the skipped cells wouldn't be totally random, and we'd have coarser-LOD cells update less frequently, but that would get very complicated as we'd have to track the total amount of cells per LOD in order to average out to WORLD_CACHE_TARGET_CELL_UPDATES.

@JMS55 JMS55 marked this pull request as draft January 2, 2026 04:05
@JMS55 JMS55 requested a review from SparkyPotato January 2, 2026 04:05
@JMS55 JMS55 added A-Rendering Drawing game state to the screen C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. labels Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Refinement Improves output quality, without fixing a clear bug or adding new functionality.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants