Explorar o código

Merge pull request #14000 from WestLangley/dev-rt_mipmaps

WebGLRenderTarget: honor options.generateMipmaps in constructor
Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
06068e744e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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 = 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.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
 	this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
 	this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
 	this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;
 	this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;