New answers tagged lighting
It depends on the implementation of the multiply operation. The internals will suppose an ordering within your matrices, row major or column major. If the ordering of your matrices is arranged the way the function expects them, then it is up to the second dpendancy: namely the respect of the correct mathematical commutativity. (which they should) When you ...
The problem is that L.Direction vector is not normalized, so the dot product "max(dot(v, toEye)" is calculating |v|*cos Θ instead of cos Θ, which is not what we want. So normalizing it on CPU side solves the problem. Thank you @snake5 for helping me on chat with it.
Your main issue is that you need to fix your normals. If you want to calculate smooth normals correctly please check my answers here and here. Also make sure that your normals are normalized. Your second issue is your attenuation values, I often get better results with one attenuation type. So try to use one type of attenuation and try to modify its value ...
Top 50 recent answers are included