Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik authored Dec 21, 2023
1 parent 25bfdde commit 504520d
Showing 1 changed file with 6 additions and 55 deletions.
61 changes: 6 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,17 @@

My implementation of https://raytracing.github.io/books/RayTracingInOneWeekend.html in Julia.

Install by cloning this package and install my fork of SIMD.jl by
```julia
] add https://github.com/Zentrik/SIMD.jl
```
Then open [RayTracingInOneWeekend.jl](src/RayTracingInOneWeekend.jl), install the other necessary packages and run.
Install by cloning this repo, activating the package environment (i.e. `cd` to the root directory, open `julia` and `] activate .`) and then instantiate (`] instantiate`).
Then open [RayTracingInOneWeekend.jl](src/RayTracingInOneWeekend.jl) and run.


Delete the definition of `SIMD.any()` if your computer does not support avx (this may also give a speedup if you have avx512)

To run a bit faster change `const Fast = false` to `true`.
![image](https://github.com/Zentrik/Renderer/assets/19725290/bc838167-db3a-4502-95e7-a94e960f41e0)

# Benchmarks

Using Claforte's benchmark: 1080p; 1000 samples per pixel; max depth is 16

Claforte's code runs in 1663s.

[RayTracingInOneWeekend.jl](src/RayTracingInOneWeekend.jl) runs in 43s on a gtx 1070.

On my laptop which has better avx2 support I get 140s, slightly slower than my c++ code giving 135s.


## IGNORE - Other Benchmarks

Polyester, ThreadsX and tullio are all slower than using @spawn

clang++ PROFVIEW

singlethreaded 2300ms
multithreaded 300ms

RayTracingInOneWeekend.jl
julia 1.9.0 rc2 - adding teardown=(sleep(0.5)) makes @benchmark give quicker results (presumably more accurate) and matches @time result

production()

single 2.5s
multi 300ms using @time / 370ms using @benchmark median

Expronicon #e946f5f

single
multi 280ms / 342 using @benchmark median

Virtual.jl - Look at Virtual.jl branch using teardown benchmark()

single
multi 285ms

Virtual.jl - with attenuation stored in sphere instead of in material - (no improvement when also returning sphere and hitrecord to avoid acessesing sphere.material in findSceneIntersection) #5c7108a using teardown benchmark()

single
multi 275ms - skeptical this is different to Expronicon

ON BATTERY POWER Virtual.jl using teardown benchmark()

single 2.374s
multi 295ms
Claforte's code runs in 1663s on the CPU.

Virtual.jl - with attenuation stored in sphere instead of in material - (no improvement when also returning sphere and hitrecord to avoid acessesing sphere.material in findSceneIntersection) using teardown benchmark()
[RayTracingInOneWeekend.jl](src/RayTracingInOneWeekend.jl) and [main.cu](c++/main.cu) run in 14s on a gtx 1070.

single 2.361s
multi 292ms
On my laptop I get 140s on the CPU.

0 comments on commit 504520d

Please sign in to comment.