summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
148c8e6)
When computing a matrix inverse, if the determinant is too small we could hit
a divide by zero. There's a check to prevent this (we basically give up on
computing the inverse and return the identity matrix.) This patch loosens
this test to fix a lighting bug reported by Lars Henning Wendt.
v2: use abs(det) to handle negative values
NOTE: This is a candidate for the 8.0 branch.
Tested-by: Lars Henning Wendt <lars.henning.wendt@gris.tu-darmstadt.de>
+ if (FABSF(det) < 1e-25)
return GL_FALSE;
det = 1.0F / det;
return GL_FALSE;
det = 1.0F / det;