Closed msub2 closed 1 year ago
r? @jdm
n.b. this may be mixing up with the row/column vector representation of transforms (a row major row vector is equivalent to a column major column vector). I don't remember if we updated Euclid correctly so we should review this carefully
(the fact that it fixes things is a promising signal, but the actual bug may be elsewhere)
This seems like the most relevant commit on Euclid's side https://github.com/servo/euclid/commit/5dba55755a43f220112ac2c37cd2c61d81d9e012. It looks like that column major change would've first been included in v21, so I believe this commit https://github.com/servo/webxr/commit/2c82ad02990ea807c2f28dc01e140b7f077c1597 updating euclid from v20 to v22 is when it would have broke.
Looking at that commit closer you can actually see that Transform3D::row_major
and Transform3D::column_major
were both converted to Transform3D::new
without modifying the existing order of elements.
That makes sense. Yeah, I wasn't sure if that upgrade had happened; if it had it's a case of this code not having been upgraded with it.
@bors-servo r=manishearth
:pushpin: Commit a20cabb has been approved by manishearth
:hourglass: Testing commit a20cabb8cc853437114a9a034f4394ae3d06a991 with merge 46bbf84093add7142f2c183755bd35282bbed2f6...
:sunny: Test successful - checks-github Approved by: manishearth Pushing 46bbf84093add7142f2c183755bd35282bbed2f6 to master...
As discovered during my experimentation the projection matrix was being constructed in row-major order, but WebXR expects it to be column-major.