Browse Source

UnrealBloomPass: Don't request depth buffer. (#34036)

Michael Herzog 1 week ago
parent
commit
8488ae0bea
1 changed files with 3 additions and 3 deletions
  1. 3 3
      examples/jsm/postprocessing/UnrealBloomPass.js

+ 3 - 3
examples/jsm/postprocessing/UnrealBloomPass.js

@@ -102,20 +102,20 @@ class UnrealBloomPass extends Pass {
 		let resx = Math.round( this.resolution.x / 2 );
 		let resx = Math.round( this.resolution.x / 2 );
 		let resy = Math.round( this.resolution.y / 2 );
 		let resy = Math.round( this.resolution.y / 2 );
 
 
-		this.renderTargetBright = new WebGLRenderTarget( resx, resy, { type: HalfFloatType } );
+		this.renderTargetBright = new WebGLRenderTarget( resx, resy, { type: HalfFloatType, depthBuffer: false } );
 		this.renderTargetBright.texture.name = 'UnrealBloomPass.bright';
 		this.renderTargetBright.texture.name = 'UnrealBloomPass.bright';
 		this.renderTargetBright.texture.generateMipmaps = false;
 		this.renderTargetBright.texture.generateMipmaps = false;
 
 
 		for ( let i = 0; i < this.nMips; i ++ ) {
 		for ( let i = 0; i < this.nMips; i ++ ) {
 
 
-			const renderTargetHorizontal = new WebGLRenderTarget( resx, resy, { type: HalfFloatType } );
+			const renderTargetHorizontal = new WebGLRenderTarget( resx, resy, { type: HalfFloatType, depthBuffer: false } );
 
 
 			renderTargetHorizontal.texture.name = 'UnrealBloomPass.h' + i;
 			renderTargetHorizontal.texture.name = 'UnrealBloomPass.h' + i;
 			renderTargetHorizontal.texture.generateMipmaps = false;
 			renderTargetHorizontal.texture.generateMipmaps = false;
 
 
 			this.renderTargetsHorizontal.push( renderTargetHorizontal );
 			this.renderTargetsHorizontal.push( renderTargetHorizontal );
 
 
-			const renderTargetVertical = new WebGLRenderTarget( resx, resy, { type: HalfFloatType } );
+			const renderTargetVertical = new WebGLRenderTarget( resx, resy, { type: HalfFloatType, depthBuffer: false } );
 
 
 			renderTargetVertical.texture.name = 'UnrealBloomPass.v' + i;
 			renderTargetVertical.texture.name = 'UnrealBloomPass.v' + i;
 			renderTargetVertical.texture.generateMipmaps = false;
 			renderTargetVertical.texture.generateMipmaps = false;

粤ICP备19079148号