|
|
@@ -4973,6 +4973,15 @@ class Texture extends EventDispatcher {
|
|
|
*/
|
|
|
this.isRenderTargetTexture = false;
|
|
|
|
|
|
+ /**
|
|
|
+ * Indicates if a texture should be handled like a texture array.
|
|
|
+ *
|
|
|
+ * @type {boolean}
|
|
|
+ * @readonly
|
|
|
+ * @default false
|
|
|
+ */
|
|
|
+ this.isTextureArray = false;
|
|
|
+
|
|
|
/**
|
|
|
* Indicates whether this texture should be processed by `PMREMGenerator` or not
|
|
|
* (only relevant for render target textures).
|
|
|
@@ -5067,6 +5076,7 @@ class Texture extends EventDispatcher {
|
|
|
|
|
|
this.renderTarget = source.renderTarget;
|
|
|
this.isRenderTargetTexture = source.isRenderTargetTexture;
|
|
|
+ this.isTextureArray = source.isTextureArray;
|
|
|
|
|
|
this.userData = JSON.parse( JSON.stringify( source.userData ) );
|
|
|
|
|
|
@@ -6407,6 +6417,7 @@ class RenderTarget extends EventDispatcher {
|
|
|
* @property {?Texture} [depthTexture=null] - Reference to a depth texture.
|
|
|
* @property {number} [samples=0] - The MSAA samples count.
|
|
|
* @property {number} [count=1] - Defines the number of color attachments . Must be at least `1`.
|
|
|
+ * @property {boolean} [multiview=false] - Whether this target is used for multiview rendering.
|
|
|
*/
|
|
|
|
|
|
/**
|
|
|
@@ -6451,7 +6462,7 @@ class RenderTarget extends EventDispatcher {
|
|
|
* @type {number}
|
|
|
* @default 1
|
|
|
*/
|
|
|
- this.depth = 1;
|
|
|
+ this.depth = options.depth ? options.depth : 1;
|
|
|
|
|
|
/**
|
|
|
* A rectangular area inside the render target's viewport. Fragments that are
|
|
|
@@ -6479,7 +6490,7 @@ class RenderTarget extends EventDispatcher {
|
|
|
*/
|
|
|
this.viewport = new Vector4( 0, 0, width, height );
|
|
|
|
|
|
- const image = { width: width, height: height, depth: 1 };
|
|
|
+ const image = { width: width, height: height, depth: this.depth };
|
|
|
|
|
|
options = Object.assign( {
|
|
|
generateMipmaps: false,
|
|
|
@@ -6491,7 +6502,8 @@ class RenderTarget extends EventDispatcher {
|
|
|
resolveStencilBuffer: true,
|
|
|
depthTexture: null,
|
|
|
samples: 0,
|
|
|
- count: 1
|
|
|
+ count: 1,
|
|
|
+ multiview: false
|
|
|
}, options );
|
|
|
|
|
|
const texture = new Texture( image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace );
|
|
|
@@ -6549,7 +6561,8 @@ class RenderTarget extends EventDispatcher {
|
|
|
*/
|
|
|
this.resolveStencilBuffer = options.resolveStencilBuffer;
|
|
|
|
|
|
- this._depthTexture = options.depthTexture;
|
|
|
+ this._depthTexture = null;
|
|
|
+ this.depthTexture = options.depthTexture;
|
|
|
|
|
|
/**
|
|
|
* The number of MSAA samples.
|
|
|
@@ -6561,6 +6574,14 @@ class RenderTarget extends EventDispatcher {
|
|
|
*/
|
|
|
this.samples = options.samples;
|
|
|
|
|
|
+ /**
|
|
|
+ * Whether to this target is used in multiview rendering.
|
|
|
+ *
|
|
|
+ * @type {boolean}
|
|
|
+ * @default false
|
|
|
+ */
|
|
|
+ this.multiview = options.multiview;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -48819,13 +48840,21 @@ class ArrayCamera extends PerspectiveCamera {
|
|
|
*/
|
|
|
this.isArrayCamera = true;
|
|
|
|
|
|
+ /**
|
|
|
+ * Whether this camera is used with multiview rendering or not.
|
|
|
+ *
|
|
|
+ * @type {boolean}
|
|
|
+ * @readonly
|
|
|
+ * @default false
|
|
|
+ */
|
|
|
+ this.isMultiViewCamera = false;
|
|
|
+
|
|
|
/**
|
|
|
* An array of perspective sub cameras.
|
|
|
*
|
|
|
* @type {Array<PerspectiveCamera>}
|
|
|
*/
|
|
|
this.cameras = array;
|
|
|
- this.index = 0;
|
|
|
|
|
|
}
|
|
|
|