Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.23 KB

README.md

File metadata and controls

32 lines (26 loc) · 1.23 KB

Overview

This project has been completed as an university assignment. Largely inspired by Ray Tracing in One Weekend

This raytracer implementation supports spheres of different materials:

  • Rugged
  • Metallic, with different roughness
  • Glass, with different transparency values

All with supporting different colours. Output image is saved in .ppm format for easiness.

Sadly, all configuration is done is code, so for tweaking see Run section

Also, we have done a multithreaded version with some additional performance tweaks at multithread branch. Also, we documented the process of multithreading in russian here.

Examples

Final render

Run

You should be able to run the project using

cabal run -O2

But you know, dependency hell and all that. Resulting image will be in output.ppm. All configuration can be done in src/Main.hs:

  • Output file resolution
  • Number of ray casts per pixel
  • Maximum bounces per ray
  • Scene configuration (this one is more involved as you can imagine)