constructor( adaptive, resolution ) {

			super();
			this.resolution = resolution !== undefined ? resolution : 256;
			this.needsInit = true;
			this.adaptive = adaptive !== undefined ? !! adaptive : true;
			this.luminanceRT = null;
			this.previousLuminanceRT = null;
			this.currentLuminanceRT = null;
			if ( THREE.CopyShader === undefined ) console.error( 'THREE.AdaptiveToneMappingPass relies on THREE.CopyShader' );
			const copyShader = THREE.CopyShader;
			this.copyUniforms = THREE.UniformsUtils.clone( copyShader.uniforms );
			this.materialCopy = new THREE.ShaderMaterial( {
				uniforms: this.copyUniforms,
				vertexShader: copyShader.vertexShader,
				fragmentShader: copyShader.fragmentShader,
				blending: THREE.NoBlending,
				depthTest: false
			} );
			if ( THREE.LuminosityShader === undefined ) console.error( 'THREE.AdaptiveToneMappingPass relies on THREE.LuminosityShader' );
			this.materialLuminance = new THREE.ShaderMaterial( {
				uniforms: THREE.UniformsUtils.clone( THREE.LuminosityShader.uniforms ),
				vertexShader: THREE.LuminosityShader.vertexShader,
				fragmentShader: THREE.LuminosityShader.fragmentShader,
				blending: THREE.NoBlending
			} );
			this.adaptLuminanceShader = {
				defines: {
					'MIP_LEVEL_1X1': ( Math.log( this.resolution ) / Math.log( 2.0 ) ).toFixed( 1 )
				},
				uniforms: {
					'lastLum': {
						value: null
					},
					'currentLum': {
						value: null
					},
					'minLuminance': {
						value: 0.01
					},
					'delta': {
						value: 0.016
					},
					'tau': {
						value: 1.0
					}
				},
				vertexShader: `varying vec2 vUv;

				void main() {

					vUv = uv;
					gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

				}`,
				fragmentShader: `varying vec2 vUv;

				uniform sampler2D lastLum;
				uniform sampler2D currentLum;
				uniform float minLuminance;
				uniform float delta;
				uniform float tau;

				void main() {

					vec4 lastLum = texture2D( lastLum, vUv, MIP_LEVEL_1X1 );
					vec4 currentLum = texture2D( currentLum, vUv, MIP_LEVEL_1X1 );

					float fLastLum = max( minLuminance, lastLum.r );
					float fCurrentLum = max( minLuminance, currentLum.r );

					//The adaption seems to work better in extreme lighting differences
					//if the input luminance is squared.
					fCurrentLum *= fCurrentLum;

					// Adapt the luminance using Pattanaik's technique
					float fAdaptedLum = fLastLum + (fCurrentLum - fLastLum) * (1.0 - exp(-delta * tau));
					// "fAdaptedLum = sqrt(fAdaptedLum);
					gl_FragColor.r = fAdaptedLum;
				}`
			};
			this.materialAdaptiveLum = new THREE.ShaderMaterial( {
				uniforms: THREE.UniformsUtils.clone( this.adaptLuminanceShader.uniforms ),
				vertexShader: this.adaptLuminanceShader.vertexShader,
				fragmentShader: this.adaptLuminanceShader.fragmentShader,
				defines: Object.assign( {}, this.adaptLuminanceShader.defines ),
				blending: THREE.NoBlending
			} );
			if ( THREE.ToneMapShader === undefined ) console.error( 'THREE.AdaptiveToneMappingPass relies on THREE.ToneMapShader' );
			this.materialToneMap = new THREE.ShaderMaterial( {
				uniforms: THREE.UniformsUtils.clone( THREE.ToneMapShader.uniforms ),
				vertexShader: THREE.ToneMapShader.vertexShader,
				fragmentShader: THREE.ToneMapShader.fragmentShader,
				blending: THREE.NoBlending
			} );
			this.fsQuad = new THREE.FullScreenQuad( null );

		}
Generate a texture that represents the luminosity of the current scene, adapted over time
to simulate the optic nerve responding to the amount of light it is receiving.
Based on a GDC2007 presentation by Wolfgang Engel titled "Post-Processing Pipeline"

Full-screen tone-mapping shader based on http://www.graphics.cornell.edu/~jaf/publications/sig02_paper.pdf