OpenGL engine thingie - correct specular highlights, no more highlights on shaded side of objects

Channel:
Subscribers:
22
Published on ● Video Link: https://www.youtube.com/watch?v=f6t9Lt-gDTc



Duration: 0:33
11 views
0


As it turns out, I was adding ambient, specular and diffuse factors and then multiplying them by the texture color.

However, apparently the correct thing to do is to add the specular highlight color to the texture color in the given fragment, and _then_ multiplying the result by the light diffusion factor (as I call it in my code) -- then the light color.

Big thanks to user LVutner from the graphics programming Discord server for the tip.