Opengl, Computer Graphics, Shaders, Texture, Shading.
calculation because the result of dot product is equal to cosine term when the two vectors are normalized. Because of transformations, Length of vector is not always same. So we need to normalize vectors continuously in this case. In right-side image, it explains to get a normal vector of a