Commit 834e888
committed
Refactor wave simulation for performance optimizations and enhance obstacle handling also change to 9-point Laplacian
- from 5 to 9-point Laplacian
- sin() LUT
- Double-buffer with index toggle
- Branchless obstacles: Multiplier grid eliminates branch mispredictions
- Core/Edge split: SIMD-friendly inner loop + bounds-checked edge ring
- Render decoupling: Physics substeps run independently from 60Hz rendering1 parent eaecf42 commit 834e888
3 files changed
Lines changed: 365 additions & 177 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments