瀏覽代碼

Merge pull request #14000 from WestLangley/dev-rt_mipmaps

WebGLRenderTarget: honor options.generateMipmaps in constructor
Mr.doob 7 年之前
父節點
當前提交
06068e744e
共有 1 個文件被更改,包括 2 次插入0 次删除
  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;