瀏覽代碼

Merge pull request #8467 from Mugen87/dev

Add comments to Firefox RGB format fix
Mr.doob 9 年之前
父節點
當前提交
383f027ef4
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      examples/js/SimulationRenderer.js
  2. 2 1
      examples/js/postprocessing/AdaptiveToneMappingPass.js

+ 1 - 1
examples/js/SimulationRenderer.js

@@ -226,7 +226,7 @@ function SimulationRenderer( WIDTH, renderer ) {
 
 		}
 
-		var texture = new THREE.DataTexture( a, WIDTH, WIDTH, THREE.RGBAFormat, THREE.FloatType );
+		var texture = new THREE.DataTexture( a, WIDTH, WIDTH, THREE.RGBAFormat, THREE.FloatType ); // was RGB format. changed to RGBA format. see discussion in #8415 / #8450
 		texture.needsUpdate = true;
 
 		return texture;

+ 2 - 1
examples/js/postprocessing/AdaptiveToneMappingPass.js

@@ -186,7 +186,8 @@ THREE.AdaptiveToneMappingPass.prototype = {
 			this.previousLuminanceRT.dispose();
 
 		}
-		var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat };
+
+		var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat }; // was RGB format. changed to RGBA format. see discussion in #8415 / #8450
 
 		this.luminanceRT = new THREE.WebGLRenderTarget( this.resolution, this.resolution, pars );
 		this.luminanceRT.texture.generateMipmaps = false;