You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A high-performance CPU-based ray tracing engine written in pure C with real-time rendering capabilities, interactive object manipulation, and physically-based materials.
Features
Rendering
Real-time ray tracing at 30-60 FPS
BVH acceleration structure for fast intersection testing
Multi-threaded rendering with OpenMP
Double-buffered framebuffer
Configurable resolution (640x480 to 1920x1080)
Geometry
Sphere primitives with quadratic intersection
Box/AABB primitives with slab method intersection
Extensible object interface for custom primitives
Materials
Lambertian BRDF for diffuse surfaces
Specular reflection with controllable reflectivity
Transparency with Fresnel-based refraction
Snell's law for accurate light bending
Opacity control (transparent, translucent, opaque)
Lighting
Point lights with color, intensity, and range
Inverse square law attenuation
Hard shadow rays
Blinn-Phong specular highlights
Support for multiple light sources
Interactive Features
Click and drag to move objects
Scroll wheel for Z-depth adjustment
Right-click context menu
Real-time property editing
Add/remove objects and lights
Scene save/load (JSON format)
Building
Prerequisites
CMake 3.16+
C11 compiler (GCC, Clang, or MSVC)
SDL2 development libraries
Windows (MSVC)
mkdir build
cd build
cmake ..-DCMAKE_BUILD_TYPE=Release
cmake --build .--config Release
Linux/macOS
mkdir build &&cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)