Browse Source

Honor options.generateMipmaps in constructor

WestLangley 7 years ago
parent
commit
695320ba80
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/renderers/WebGLRenderTarget.js

+ 3 - 0
src/renderers/WebGLRenderTarget.js

@@ -30,10 +30,13 @@ function WebGLRenderTarget( width, height, options ) {
 
 	this.texture = new Texture( undefined, undefined, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
 
+	this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : true;
+
 	this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
 	this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
 	this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;
 
+
 }
 
 WebGLRenderTarget.prototype = Object.assign( Object.create( EventDispatcher.prototype ), {