This repo serves me the sole purpose to track my work on the labs.
Time to build a Raytracer with SDL2.
Lighting intensity with no colors nor shadows, resolution is 100x100 to make interactivity possible.
Colors added in together with lighting.
After adding in shadows + direct lighting + ambient lighting
After building a simple raytracer, it's time to build a resterizer!
The second image does not have the skew effect because perspective correct interpolation was used for the 3D position of the pixels. Apart from this, in both cases, no interpolation is performed for the lighting, but pixel positions are interpolated instead.
Lighting is then calculated for each pixel, making the final result more accurate.