Skip to content

Commit 786ed7f

Browse files
committed
mrdoob#8445 Fix Errors in Tone Mapping Demo
1 parent 53fbc5d commit 786ed7f

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

examples/js/postprocessing/AdaptiveToneMappingPass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ THREE.AdaptiveToneMappingPass.prototype = {
186186
this.previousLuminanceRT.dispose();
187187

188188
}
189-
var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat };
189+
var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat };
190190

191191
this.luminanceRT = new THREE.WebGLRenderTarget( this.resolution, this.resolution, pars );
192192
this.luminanceRT.texture.generateMipmaps = false;

examples/js/shaders/GammaCorrectionShader.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,11 @@ THREE.GammaCorrectionShader = {
3434

3535
"varying vec2 vUv;",
3636

37-
THREE.ShaderChunk[ "common" ],
38-
3937
"void main() {",
4038

4139
"vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );",
4240

43-
"gl_FragColor = vec4( linearToOutput( tex.rgb ), tex.a );",
41+
"gl_FragColor = LinearToGamma( tex, 2.0 );",
4442

4543
"}"
4644

0 commit comments

Comments
 (0)