Devember devlog #5


I’ve reached one of my goals today, which was adding the Phong reflection model to one sphere in my ray tracer. Despite this, I haven’t marked the goal as complete because I want to take a look at the specular component which, to me, seems like it’s not working properly.

You can watch the advances I made today in my 1+ hour session at the above image. I had some problems getting the first picture, as at first I wasn’t clamping my color values and after that, my clamp code was using the wrong variable at the assignment (sigh). After fixing this, I managed to add the specular component without too much problem, as it’s showed in the previous image. In the second picture the shininess was 2 and in the third one, 20. You can also see some white at the bottom of the sphere, which makes me thinks that my code is not fully right. Tomorrow I’ll check it , as maybe I’m just wrong and that is the expected result.

That’s all for today. You can find the code in my github repo [0].

Comments are appreciated :)


Like what you read? Give Ralntdir a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.