constructor( renderer, res = 1024 ) {

			this.renderer = renderer;
			this.res = res;
			this.lightMapContainers = [];
			this.compiled = false;
			this.scene = new THREE.Scene();
			this.scene.background = null;
			this.tinyTarget = new THREE.WebGLRenderTarget( 1, 1 );
			this.buffer1Active = false;
			this.firstUpdate = true;
			this.warned = false; // Create the Progressive LightMap Texture

			const format = /(Android|iPad|iPhone|iPod)/g.test( navigator.userAgent ) ? THREE.HalfFloatType : THREE.FloatType;
			this.progressiveLightMap1 = new THREE.WebGLRenderTarget( this.res, this.res, {
				type: format
			} );
			this.progressiveLightMap2 = new THREE.WebGLRenderTarget( this.res, this.res, {
				type: format
			} ); // Inject some spicy new logic into a standard phong material

			this.uvMat = new THREE.MeshPhongMaterial();
			this.uvMat.uniforms = {};

			this.uvMat.onBeforeCompile = shader => {

				// Vertex Shader: Set Vertex Positions to the Unwrapped UV Positions
				shader.vertexShader = '#define USE_LIGHTMAP\n' + shader.vertexShader.slice( 0, - 1 ) + '	gl_Position = vec4((uv2 - 0.5) * 2.0, 1.0, 1.0); }'; // Fragment Shader: Set Pixels to average in the Previous frame's Shadows

				const bodyStart = shader.fragmentShader.indexOf( 'void main() {' );
				shader.fragmentShader = 'varying vec2 vUv2;\n' + shader.fragmentShader.slice( 0, bodyStart ) + '	uniform sampler2D previousShadowMap;\n	uniform float averagingWindow;\n' + shader.fragmentShader.slice( bodyStart - 1, - 1 ) + `\nvec3 texelOld = texture2D(previousShadowMap, vUv2).rgb;
				gl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/averagingWindow);
			}`; // Set the Previous Frame's Texture Buffer and Averaging Window

				shader.uniforms.previousShadowMap = {
					value: this.progressiveLightMap1.texture
				};
				shader.uniforms.averagingWindow = {
					value: 100
				};
				this.uvMat.uniforms = shader.uniforms; // Set the new Shader to this

				this.uvMat.userData.shader = shader;
				this.compiled = true;

			};

		}
Progressive Light Map Accumulator, by [zalo](https://github.com/zalo/)

To use, simply construct a `ProgressiveLightMap` object,
`plmap.addObjectsToLightMap(object)` an array of semi-static
objects and lights to the class once, and then call
`plmap.update(camera)` every frame to begin accumulating
lighting samples.

This should begin accumulating lightmaps which apply to
your objects, so you can start jittering lighting to achieve
the texture-space effect you're looking for.

@param {WebGLRenderer} renderer A WebGL Rendering Context
@param {number} res The side-long dimension of you total lightmap