diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-04-04 11:36:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-04 11:36:56 -0400 |
commit | f1b82f8573d825a40e4fe0d32559b1acb169ac9c (patch) | |
tree | f2d1912d54abfe3f00186b177c5804d0af38952d /components/script/dom/webglshaderprecisionformat.rs | |
parent | 3e86aec26e8f0626a6c66faa56d6edb0fce8d793 (diff) | |
parent | e055884564f6bf1db0ea2ca6af3b3aaafd4fd17b (diff) | |
download | servo-f1b82f8573d825a40e4fe0d32559b1acb169ac9c.tar.gz servo-f1b82f8573d825a40e4fe0d32559b1acb169ac9c.zip |
Auto merge of #23159 - Manishearth:rigid-transforms, r=asajeffrey
Update XR code to use rigid transforms and new pose/transform stuff from the spec
This updates our XR code to use euclid's new [RigidTransform3D type](https://github.com/servo/euclid/pull/328), which is more efficent and convenient to work with.
It additionally brings us up to speed with the spec:
- `XRViewerPose` was made a subclass of `XRPose` (https://github.com/immersive-web/webxr/pull/496)
- `XRView.viewMatrix` was removed in favor of `XRRigidTransform.inverse.matrix` (https://github.com/immersive-web/webxr/pull/531)
- `XRRigidTransform.inverse` is an attribute (https://github.com/immersive-web/webxr/pull/560)
- `XRRigidTransform` now validates positions in its constructor (https://github.com/immersive-web/webxr/pull/568)
Furthermore, it adds support for `XRRigidTransform.matrix`.
While fixing this I also noticed that our view matrix code was incorrect, we calculated view matrices as `pose.to_column_major_array()`, whereas it *should* be `pose.inverse().to_row_major_array()` (since Euclid uses row vectors, whenever the spec says it wants a column major array we should use `.to_row_major_array()` since all web specs implicitly use column vectors). For 3DOF devices poses are mostly rotations anyway, so the effective transpose behaved _like_ an inversion, but was incorrect.
This PR gets rid of `view.viewMatrix` anyway, however I felt like I should mention this discrepancy, since otherwise the replacement of `view.viewMatrix` with `view.transform.inverse.matrix` doesn't make sense
r? @jdm
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23159)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webglshaderprecisionformat.rs')
0 files changed, 0 insertions, 0 deletions