You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/core/RenderTarget.js
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,8 @@ class RenderTarget extends EventDispatcher {
36
36
* @property {number} [samples=0] - The MSAA samples count.
37
37
* @property {number} [count=1] - Defines the number of color attachments . Must be at least `1`.
38
38
* @property {number} [depth=1] - The texture depth.
39
-
* @property {boolean} [multiview=false] - Whether this target is used for multiview rendering.
39
+
* @property {boolean} [multiview=false] - Whether this target is used for multiview rendering (WebGL OVR_multiview2 extension).
40
+
* @property {boolean} [useArrayDepthTexture=false] - Whether to create the depth texture as an array texture for per-layer depth testing. This is separate from multiview to allow array depth textures without the multiview extension (e.g., for WebGPU XR).
40
41
*/
41
42
42
43
/**
@@ -62,7 +63,8 @@ class RenderTarget extends EventDispatcher {
62
63
samples: 0,
63
64
count: 1,
64
65
depth: 1,
65
-
multiview: false
66
+
multiview: false,
67
+
useArrayDepthTexture: false
66
68
},options);
67
69
68
70
/**
@@ -200,6 +202,16 @@ class RenderTarget extends EventDispatcher {
200
202
*/
201
203
this.multiview=options.multiview;
202
204
205
+
/**
206
+
* Whether to create the depth texture as an array texture for per-layer depth testing.
207
+
* This is separate from multiview to allow array depth textures without the multiview
208
+
* extension (e.g., for WebGPU XR which doesn't use OVR_multiview2).
0 commit comments