|
@@ -23,10 +23,10 @@ class WebGLRenderTarget extends EventDispatcher {
|
|
|
|
|
|
this.viewport = new Vector4( 0, 0, width, height );
|
|
|
|
|
|
- this.texture = new Texture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
|
|
|
- this.texture.isRenderTargetTexture = true;
|
|
|
+ const image = { width: width, height: height, depth: 1 };
|
|
|
|
|
|
- this.texture.image = { width: width, height: height, depth: 1 };
|
|
|
+ this.texture = new Texture( image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
|
|
|
+ this.texture.isRenderTargetTexture = true;
|
|
|
|
|
|
this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
|
|
|
this.texture.internalFormat = options.internalFormat !== undefined ? options.internalFormat : null;
|