2024-10-11 00:03:50 +02:00
2024-10-10 12:41:11 +02:00
2024-10-10 23:58:59 +02:00
2024-10-10 12:27:21 +02:00
2024-10-10 12:37:59 +02:00
2024-10-11 00:03:50 +02:00
2024-10-09 14:56:07 +02:00
2024-10-09 14:56:07 +02:00
2024-10-09 14:56:07 +02:00

This is the implementation of the ray tracing algorithm on the CPU

scene 0

Build

The supported platforms are Windows and Linux. On Linux you need to manually install GLFW 3:

sudo apt install libglfw3-dev

After that you can build the program:

make

The executable you need to run is ray_trace.exe.

Usage

You need to run the renderer from the command line providing it the proper arguments:

./ray_trace.exe --scene scene_0.txt --threads 16 --init-scale 2

This will open a window with the rendered scene. You can more around with WASD and change the camera direction with the mouse.

You should use a number of threads equal to the number of CPU cores. The --init-scale lowers the initial resolution of the scene when moving the camera and can be any power of two between 1 and 16 (1, 2, 4, 8, 16).

Other Pics

scene 0 scene 1 scene 2

S
Description
Ray Tracing on the CPU
Readme MIT
14 MiB
Languages
HTML 67.9%
C 28.1%
JavaScript 2.3%
CSS 1%
Objective-C 0.6%