Devember devlog #6
As you can see in the image above, I’ve changed my scene a bit. I’ve done this trying to find the problem I thought I had with the specular term in my shading equation and, indeed, I can confirm that I had a problem with it.
I was basing my shading formula in the one you can see in the Wikipedia page for “Phong reflection model” . The problem is that in the text there is some relevant information that I didn’t read
Although the above formulation is the common way of presenting the Phong reflection model, each term should only be included if the term’s dot product is positive.
so my formula wasn’t 100% right. After changing my scene and debugging it for almost the whole hour, I realized that I was adding the specular term even when the dot product of the vectors R and V was negative, which was wrong. When I fixed that, I got the result you can watch in the header.
Hopefully tomorrow I can advance a bit more than today, but it’s important to have the basics working properly :). As always, the code is in my github repo .
See you tomorrow!