Walther / clovers

Ray Tracing in Rust
https://walther.github.io/clovers/clovers/
13 stars 1 forks source link

2022 06 05 fixes #146

Closed Walther closed 2 years ago

Walther commented 2 years ago

Before:

Benchmark 1: ./target/release/clovers-cli -w 512 -h 256 -s 100 -q -i scenes/cornell.json -o temp.png
  Time (mean ± σ):     336.5 ms ±   4.3 ms    [User: 17087.1 ms, System: 2971.6 ms]
  Range (min … max):   329.4 ms … 342.0 ms    10 runs

Benchmark 1: ./target/release/clovers-cli -w 512 -h 256 -s 100 -q -i scenes/scene.json -o temp.png
  Time (mean ± σ):      2.922 s ±  0.012 s    [User: 144.223 s, System: 0.514 s]
  Range (min … max):    2.894 s …  2.935 s    10 runs

After:

Benchmark 1: ./target/release/clovers-cli -w 512 -h 256 -s 100 -q -i scenes/cornell.json -o temp.png
  Time (mean ± σ):     654.2 ms ±   7.3 ms    [User: 39139.4 ms, System: 1024.2 ms]
  Range (min … max):   642.0 ms … 669.5 ms    10 runs

Benchmark 1: ./target/release/clovers-cli -w 512 -h 256 -s 100 -q -i scenes/scene.json -o temp.png
  Time (mean ± σ):      3.989 s ±  0.013 s    [User: 211.914 s, System: 0.618 s]
  Range (min … max):    3.966 s …  4.007 s    10 runs

Both the cornell scene and the dragon-teapot-bunny scene regress in speed moderately, BUT the visual improvements from faster convergence due to fixing the priority sampling make it well worth it. Much fewer samples per pixel are required now for a decent picture quality!

Before, 1 spp 1654505647 After, 1 spp 1654505668 Before, 10 spp 1654505651 After, 10 spp 1654505672