Browse Source

Merge pull request #14000 from WestLangley/dev-rt_mipmaps

WebGLRenderTarget: honor options.generateMipmaps in constructor
Mr.doob 7 years ago
parent
commit
06068e744e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/renderers/WebGLRenderTarget.js

+ 2 - 0
src/renderers/WebGLRenderTarget.js

@@ -30,6 +30,8 @@ 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;