Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ssloy/tinyraytracer
A brief computer graphics / rendering course
https://github.com/ssloy/tinyraytracer
3d 3d-graphics c-plus-plus computer-graphics cpp fun graphics images learning raytracer raytracing raytracing-engine rendering rendering-engine shaders software-renderer tutorial
Last synced: 7 days ago
JSON representation
A brief computer graphics / rendering course
- Host: GitHub
- URL: https://github.com/ssloy/tinyraytracer
- Owner: ssloy
- Created: 2019-01-20T11:12:19.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-07T05:37:37.000Z (over 1 year ago)
- Last Synced: 2024-11-20T20:42:39.328Z (22 days ago)
- Topics: 3d, 3d-graphics, c-plus-plus, computer-graphics, cpp, fun, graphics, images, learning, raytracer, raytracing, raytracing-engine, rendering, rendering-engine, shaders, software-renderer, tutorial
- Language: C++
- Homepage: https://github.com/ssloy/tinyraytracer/wiki
- Size: 151 MB
- Stars: 5,044
- Watchers: 69
- Forks: 333
- Open Issues: 16
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
- awesome-computer-graphics-resources - Tiny Taytracer - Tiny Raytracer (3D computer graphics / Raytracing)
- awesome-list - tinyraytracer - Understandable RayTracing in 256 lines of bare C++. (CG Tutorials / Data Management)
README
# Understandable RayTracing in 256 lines of bare C++
This repository is a support code for my computer graphics lectures. It is not meant to be the ultimate rendering code or even physically realistic. It is meant to be **simple**. This project is distributed under the [DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE](https://en.wikipedia.org/wiki/WTFPL).
**Check [the wiki](https://github.com/ssloy/tinyraytracer/wiki) that accompanies the source code. The second raytracing chapter is available [in the tinykaboom repository](https://github.com/ssloy/tinykaboom/wiki). If you are looking for a software rasterizer, check the [other part of the lectures](https://github.com/ssloy/tinyrenderer/wiki).**
In my lectures I tend to avoid third party libraries as long as it is reasonable, because it forces to understand what is happening under the hood. So, the raytracing 256 lines of plain C++ give us this result:
![](https://raw.githubusercontent.com/ssloy/tinyraytracer/master/out.jpg)## compilation
```sh
git clone https://github.com/ssloy/tinyraytracer.git
cd tinyraytracer
mkdir build
cd build
cmake ..
make
```You can open the project in Gitpod, a free online dev evironment for GitHub:
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ssloy/tinyraytracer)
On open, the editor will compile & run the program as well as open the resulting image in the editor's preview.
Just change the code in the editor and rerun the script (use the terminal's history) to see updated images.