Potential fix to #511
parent
25eaf8f72f
commit
1d69021e94
|
@ -422,7 +422,9 @@ void CGL21Device::SetTransform(TransformType type, const Math::Matrix &matrix)
|
|||
|
||||
// normal transform
|
||||
Math::Matrix normalMat = matrix;
|
||||
normalMat = normalMat.Inverse();
|
||||
|
||||
if (abs(normalMat.Det()) > 1e-6)
|
||||
normalMat = normalMat.Inverse();
|
||||
|
||||
glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array());
|
||||
}
|
||||
|
|
|
@ -449,7 +449,9 @@ void CGL33Device::SetTransform(TransformType type, const Math::Matrix &matrix)
|
|||
|
||||
// normal transform
|
||||
Math::Matrix normalMat = matrix;
|
||||
normalMat = normalMat.Inverse();
|
||||
|
||||
if (abs(normalMat.Det()) > 1e-6)
|
||||
normalMat = normalMat.Inverse();
|
||||
|
||||
glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue