Browse Source

WebGLRenderTarget: Clean up.

Mr.doob 4 years ago
parent
commit
814b851d83
1 changed files with 1 additions and 5 deletions
  1. 1 5
      src/renderers/WebGLRenderTarget.js

+ 1 - 5
src/renderers/WebGLRenderTarget.js

@@ -25,15 +25,11 @@ class WebGLRenderTarget extends EventDispatcher {
 
 		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;
-		if ( 'internalFormat' in options ) {
-
-			this.texture.internalFormat = options.internalFormat;
-
-		}
 
 		this.texture.image = { width: width, height: height, depth: 1 };
 
 		this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
+		this.texture.internalFormat = options.internalFormat !== undefined ? options.internalFormat : null;
 		this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
 
 		this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;