From 32b56a4bf7242a8ce13af1bf436748d4f2a19df1 Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Mon, 28 Sep 2015 16:09:57 -0700 Subject: [PATCH] fix the slight flicker that's being caused by error in calculating the model inverse matrix --- libraries/gpu/src/gpu/GLBackendTransform.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/GLBackendTransform.cpp b/libraries/gpu/src/gpu/GLBackendTransform.cpp index 99db7b38e8..b2408be172 100755 --- a/libraries/gpu/src/gpu/GLBackendTransform.cpp +++ b/libraries/gpu/src/gpu/GLBackendTransform.cpp @@ -97,7 +97,11 @@ 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 slightly physical objects. + //_model.getInverseMatrix(_object._modelInverse); + _object._modelInverse =glm::inverse(_object._model); } if (_invalidView || _invalidProj || _invalidViewport) {