提交 39ff01e5 编写于 作者: M Mr.doob

Merge pull request #8450 from Mugen87/tonemapping

Fix Errors in Tone Mapping Demo
......@@ -186,7 +186,7 @@ THREE.AdaptiveToneMappingPass.prototype = {
this.previousLuminanceRT.dispose();
}
var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat };
var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat };
this.luminanceRT = new THREE.WebGLRenderTarget( this.resolution, this.resolution, pars );
this.luminanceRT.texture.generateMipmaps = false;
......
......@@ -28,19 +28,15 @@ THREE.GammaCorrectionShader = {
fragmentShader: [
"#define GAMMA_FACTOR 2",
"uniform sampler2D tDiffuse;",
"varying vec2 vUv;",
THREE.ShaderChunk[ "common" ],
"void main() {",
"vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );",
"gl_FragColor = vec4( linearToOutput( tex.rgb ), tex.a );",
"gl_FragColor = LinearToGamma( tex, float( GAMMA_FACTOR ) );",
"}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册