To be specific when we do dot product between light vector and normal vector in difusse part - we normalize normal vector.

And dot product between reflection vector and eye position vector in specular part - we again normalize normal vector when we are calculating reflection vector and also view direction vector.

All i was able to find is that we do not care about their magnitude or position, only direction, but why is it so? Why is it mistake to not normalize them?

"When calculating lighting we usually do not care about the magnitude of a vector or their position; we only care about their direction. Because we only care about their direction almost all the calculations are done with unit vectors since it simplifies most calculations (like the dot product). So when doing lighting calculations, make sure you always normalize the relevant vectors to ensure they're actual unit vectors. Forgetting to normalize a vector is a popular mistake." - https://learnopengl.com/Lighting/Basic-Lighting



1 Answer 1


They need to be normalized in order so dot product returns cos value <-1, 1> which will be multiplied with color intensity. If it would not be in that interval, color will not be right.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .