Skip to content
repo for notes, c++ and javascript code in each step learning how to build a ray tracer
JavaScript C++ Makefile HTML C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
001-ppm-example
002-stb-example
003-vec3
004-ray
005-sphere
006-surface-normals
007-hittable
008-anti-aliasing
009-diffuse-materials
010-metal
.gitignore
.gitmodules
README.md
raytracing.code-workspace

README.md

Ray Tracing Notes and Experiments

This repository contains source code created during my learning journey to building a ray tracer.

The inital code is largely based on Peter Shirley's excellent book "Ray Tracing in One Weekend" but this repo will not be limited to this book alone. I plan to include his other two volumes, my own experiments and other sources for inspiration later as well.

I tested and compiled the code with the GNU compiler on Linux Mint and Windows with cygwin and Microsoft C++ (Visual Studio Code). It should work on other platforms as well, but let me know if it doesn't work on Mac. I also want to look into cmake, but this will have to wait until it makes sense for the project.

Some chapters also contain an HTML file with a Javascript version. I'm sure that the ray tracer will eventually require more than what can be achieved in a pure Javascript implementation, but let's see how far I can take this. I'm curious to find out what's possible and what can be done to speed it up for the web. :)

WebAssembly, Emscripten and Rust are some options I want to explore here later as well.

For more examples, please see my ray tracing notes.

The idea behind this is to document and further my own learning by trying to explain it to myself in my own words. I hope it makes sense to someone else as well, but I will probably not have much time to edit and polish my writing very much. There's always a chance I understood something wrong, made a mistake, or didn't follow best practices or proper style. If you spot anything that's wrong or could use some improvement, please let me know. Any feedback, suggestions, or bug reports are always appreciated!

At the bottom of each chapter you can find references to the books and resources that helped me through this journey. Be sure to check them for more information and expert insights.

I hope you find this material interesting and helpful.

Gerrit

You can’t perform that action at this time.