MozillaReality / webvr-spec

*** MOVED TO https://github.com/w3c/webvr ***
https://w3c.github.io/webvr/
Other
158 stars 19 forks source link

eyeTranslation.w must be one #8

Closed Codes4Fun closed 8 years ago

Codes4Fun commented 9 years ago

I've noticed this issue with current implementations of webvr, they have eyeTranslation.w set to zero. There are two problems with this: 1) If you transform eyeTranslation with a 4x4 matrix, it will not be translated by the matrix. 2) If you toss eyeTranslation into a 4x4 matrix the w being zero will mean all points transformed by the matrix will have their w set to zero.

w=1 is meant for positional vectors, while w=0 is meant for direction vectors that you don't want to translate like surface normals, velocities, etc.

I would think this means that either eyeTranslation not have a w or require w to always be one.

toji commented 9 years ago

Good observation. I'll update the spec and make sure that future Chrome releases take this into account.

toji commented 8 years ago

I believe this has been fixed for the last few Chrome VR builds now. Closing.