I'm not sure about this one. Unless explicitly checked for, (0, 0, 0) will cause a division by zero when trying to normalize it, and I don't know for sure if GL has well defined behaviour for it.
Am Dienstag, 21. August 2007 12:57 schrieb H. Verbeet:
I'm not sure about this one. Unless explicitly checked for, (0, 0, 0) will cause a division by zero when trying to normalize it, and I don't know for sure if GL has well defined behaviour for it.
You're right, this patch is asking for problems with normalization. Perhaps we should disable normalization if no normals are provided, but I will double check the lighting equations first for divisions by zero, but afair there's only a cross product and a multiplication there.