|
@@ -2494,13 +2494,13 @@ class WebGLRenderTarget extends EventDispatcher {
|
|
this.scissor = new Vector4(0, 0, width, height);
|
|
this.scissor = new Vector4(0, 0, width, height);
|
|
this.scissorTest = false;
|
|
this.scissorTest = false;
|
|
this.viewport = new Vector4(0, 0, width, height);
|
|
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;
|
|
|
|
- this.texture.image = {
|
|
|
|
|
|
+ const image = {
|
|
width: width,
|
|
width: width,
|
|
height: height,
|
|
height: height,
|
|
depth: 1
|
|
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.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
|
|
this.texture.internalFormat = options.internalFormat !== undefined ? options.internalFormat : null;
|
|
this.texture.internalFormat = options.internalFormat !== undefined ? options.internalFormat : null;
|
|
this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
|
|
this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
|
|
@@ -9110,7 +9110,13 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
|
|
// and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture
|
|
// and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture
|
|
// as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures).
|
|
// as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures).
|
|
|
|
|
|
- this.texture = new CubeTexture(undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding);
|
|
|
|
|
|
+ const image = {
|
|
|
|
+ width: size,
|
|
|
|
+ height: size,
|
|
|
|
+ depth: 1
|
|
|
|
+ };
|
|
|
|
+ const images = [image, image, image, image, image, image];
|
|
|
|
+ this.texture = new CubeTexture(images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding);
|
|
this.texture.isRenderTargetTexture = true;
|
|
this.texture.isRenderTargetTexture = true;
|
|
this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
|
|
this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
|
|
this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
|
|
this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
|