aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/tests/webxr/resources/webxr_test_constants.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/tests/webxr/resources/webxr_test_constants.js')
-rw-r--r--tests/wpt/tests/webxr/resources/webxr_test_constants.js25
1 files changed, 23 insertions, 2 deletions
diff --git a/tests/wpt/tests/webxr/resources/webxr_test_constants.js b/tests/wpt/tests/webxr/resources/webxr_test_constants.js
index d0d4fa27474..c08cdd9b251 100644
--- a/tests/wpt/tests/webxr/resources/webxr_test_constants.js
+++ b/tests/wpt/tests/webxr/resources/webxr_test_constants.js
@@ -25,8 +25,12 @@ const VALID_POSE_TRANSFORM = {
orientation: [0.5, 0.5, 0.5, 0.5]
};
-const VALID_PROJECTION_MATRIX =
- [1, 0, 0, 0, 0, 1, 0, 0, 3, 2, -1, -1, 0, 0, -0.2, 0];
+const VALID_PROJECTION_MATRIX = [
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 3, 2, -1, -1,
+ 0, 0, -0.2, 0
+];
// This is a decomposed version of the above.
const VALID_FIELD_OF_VIEW = {
@@ -36,6 +40,16 @@ const VALID_FIELD_OF_VIEW = {
rightDegrees: 75.9637
};
+// This is roughly equivalent to the above, but with a different near plane.
+// The fact that it's the same isn't too concerning, since to be the same
+// ViewGeometry it'd also need the same offset.
+const VALID_DEPTH_PROJECTION_MATRIX = [
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 3, 2, -1, -1,
+ 0, 0, -0.002, 0
+];
+
// A valid input grip matrix for when we don't care about specific values
const VALID_GRIP = [1, 0, 0, 0,
0, 1, 0, 0,
@@ -94,6 +108,13 @@ const RIGHT_OFFSET = {
orientation: [0, 0, 0, 1]
};
+// Most depth tests at present are effectively monocular, so just ensure we
+// substantially overlap the left eye.
+const DEPTH_OFFSET = {
+ position: [-0.1, 0.01, 0],
+ orientation: [0, 0, 0, 1]
+};
+
const FIRST_PERSON_OFFSET = {
position: [0, 0.1, 0],
orientation: [0, 0, 0, 1]