microsoft / HoloJS

Provides a framework for creating holographic apps using JavaScript and WebGL.
MIT License
1.19k stars 114 forks source link

Fix holograms swimming during mixed reality capture #113

Closed Almost-Done closed 7 years ago

Almost-Done commented 7 years ago

100

ANGLE issue. In auto-stereo mode, scripts render with a mid view and mid projection matrix that is reverted later in ANGLE by applying the inverse. However there was a mismatch between the script's matrices and native's inverse: script : mid view right projection native: left view left projection

Normally, this mismatch would cause minor wobbling that might go unnoticed. However, during mixed reality capture, the right projection matrix is vastly different than left (right has to cover the whole video frame), and the discrepancy between script and native is so big that holograms behave weirdly during capture.

The ANGLE fix is to compute the inverse as inverse(mid view * right projetion)