Back in times, raytracing was only used with offline renderers but this is not the case anymore and having beautiful images appear instantly is amazing. This is one of the reasons I decided to take a dive into it.
On the other hand, raytracing is linked with a lot of subjects I love, such as lighting. So, I decided to cast some rays into Unity and see how it goes.
The aim was to make it run in realtime, so I decided to use compute shaders inside Unity to improve speed. I also implemented a BVH structure, to be able to visualize meshes, and interpolated their normals to avoid having a polygonal look.
Other part of the work was linked with the materials, to be able to handle reflection or self-illumination for example.
Direct Lighting and Ambient Occlusion
Inspired by project PICA PICA and his hybrid realtime rendering pipeline developed at SEED, I decided to handle directional light with variable penumbra width and ambient occlusion inside my raytracer.