tinyraytracer

A brief computer graphics / rendering course

Github星跟蹤圖

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.

Check the wiki that accompanies the source code. The second raytracing chapter is available in the tinykaboom repository. If you are looking for a software rasterizer, check the other part of the lectures.

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:

compilation

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

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.

主要指標

概覽
名稱與所有者ssloy/tinyraytracer
主編程語言C++
編程語言CMake (語言數: 3)
平台
許可證
所有者活动
創建於2019-01-20 11:12:19
推送於2023-07-07 05:37:37
最后一次提交2022-03-18 17:33:28
發布數0
用户参与
星數5.2k
關注者數68
派生數343
提交數40
已啟用問題?
問題數28
打開的問題數13
拉請求數4
打開的拉請求數3
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?