mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
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:
commit
adee97b95c
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue