C++ SFML Ray Tracing CPU - Phong reflection model

preview_player
Показать описание
Every pixel on screen has its own ray which checks for collision with objects in the scene (spheres, triangles and plane). This time Phong model was implemented to emulate real-word reflection, diffiuse and specular effects. Recursive reflection also works on this example.

For testing resolution can be changed by mouse scroll for efficiency test reason.

Source code on GitHub repository:

Phong model wikipedia page:
Рекомендации по теме
join shbcf.ru