This project contains two C++ renderers for a Cornell Box scene:
radiosity.cpp: a pure patch-based radiosity rendererhybrid_radiosity.cpp: a hybrid renderer that combines per-pixel direct lighting with radiosity-based indirect lighting
Both programs render a simplified Cornell Box with two rotated boxes and write the result as a P3 PPM image.
https://www.shadertoy.com/view/7cSSWG
The pure radiosity version:
- discretizes the scene into diffuse patches
- estimates form factors between patches
- solves energy exchange iteratively
- shades each visible point from the radiosity value of the hit patch
This version is simple and useful for studying classic radiosity, but patch boundaries are visible.
The hybrid version separates lighting into two parts:
- direct lighting: evaluated per pixel by sampling the rectangular area light and tracing shadow rays
- indirect lighting: approximated with patch-based radiosity
This produces more believable direct shadows while keeping the diffuse interreflection behavior of radiosity.
Both renderers contain OpenMP parallel loop structure in the expensive stages:
- form factor construction
- radiosity iteration
- framebuffer rendering
If your compiler and runtime provide OpenMP support, CMake will link it automatically. If not, the project can still be built in serial mode.



