Merge pull request #5922 from ZappoMan/fixFlicker

fix the slight flicker that's being caused by error in calculating the model inverse matrix
This commit is contained in:
Brad Davis 2015-09-28 17:37:32 -07:00
commit adee97b95c

View file

@ -97,7 +97,12 @@ void GLBackend::TransformStageState::preUpdate(size_t commandIndex, const Stereo
if (_invalidModel) {
_model.getMatrix(_object._model);
_model.getInverseMatrix(_object._modelInverse);
// FIXME - we don't want to be using glm::inverse() here but it fixes the flickering issue we are
// seeing with planky blocks in toybox. Our implementation of getInverseMatrix() is buggy in cases
// of non-uniform scale. We need to fix that. In the mean time, glm::inverse() works.
//_model.getInverseMatrix(_object._modelInverse);
_object._modelInverse = glm::inverse(_object._model);
}
if (_invalidView || _invalidProj || _invalidViewport) {