-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Precompute light propagation data at build time instead of in
Space
…
… initialization. Instead of making a chart for the exact right size, we make the biggest one we can, then do a distance check while iterating. This avoids redundant run-time work and, in particular, should make the tests we run under Miri that happen to allocate `Space`s much faster. Size of the data is a concern; it's currently 645 KB. In the future, I plan to replace this data structure with one which combines nearly-parallel rays that traverse the same cubes, until they diverge, instead of redundantly storing and iterating over each ray's sequence of cubes. That will allow more rays for the same data and compute costs. One unused possibility for further compression is storing *only* the face/step directions instead of both the faces and the cube coordinates.
- Loading branch information
Showing
5 changed files
with
295 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.