/**
 * @author alteredq / http://alteredqualia.com/
 */

THREE.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount, grayscale ) {

	THREE.Pass.call( this );

	if ( THREE.FilmShader === undefined )
		console.error( "THREE.FilmPass relies on THREE.FilmShader" );

	var shader = THREE.FilmShader;

	this.uniforms = Object.assign( {}, shader.uniforms );

	this.material = new THREE.ShaderMaterial( {

		uniforms: this.uniforms,
		vertexShader: shader.vertexShader,
		fragmentShader: shader.fragmentShader

	} );

	if ( grayscale !== undefined )	this.uniforms.grayscale.value = grayscale;
	if ( noiseIntensity !== undefined ) this.uniforms.nIntensity.value = noiseIntensity;
	if ( scanlinesIntensity !== undefined ) this.uniforms.sIntensity.value = scanlinesIntensity;
	if ( scanlinesCount !== undefined ) this.uniforms.sCount.value = scanlinesCount;

	this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
	this.scene  = new THREE.Scene();

	this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null );
	this.scene.add( this.quad );

};

THREE.FilmPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {

	constructor: THREE.FilmPass,

	render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {

		this.uniforms[ "tDiffuse" ].value = readBuffer.texture;
		this.uniforms[ "time" ].value += delta;

		this.quad.material = this.material;

		if ( this.renderToScreen ) {

			renderer.render( this.scene, this.camera );

		} else {

			renderer.render( this.scene, this.camera, writeBuffer, this.clear );

		}

	}

} );

@@ -519,24 +519,125 @@
 der%0A%0A%09%7D );%0A%0A
+%09this.uniforms%5B %22tDiffuse%22 %5D = new THREE.Uniform();%0A%09this.uniforms%5B %22time%22 %5D = new THREE.Uniform();%0A%0A
 %09if ( graysc
@@ -679,24 +679,37 @@
 rayscale
-.value =
+ = new THREE.Uniform(
  graysca
@@ -710,16 +710,18 @@
 rayscale
+ )
 ;%0A%09if ( 
@@ -775,24 +775,37 @@
 ntensity
-.value =
+ = new THREE.Uniform(
  noiseIn
@@ -803,32 +803,34 @@
 ( noiseIntensity
+ )
 ;%0A%09if ( scanline
@@ -880,24 +880,37 @@
 ntensity
-.value =
+ = new THREE.Uniform(
  scanlin
@@ -920,16 +920,18 @@
 ntensity
+ )
 ;%0A%09if ( 
@@ -981,24 +981,37 @@
 s.sCount
-.value =
+ = new THREE.Uniform(
  scanlin
@@ -1017,16 +1017,18 @@
 nesCount
+ )
 ;%0A%0A%09this

stop sharing of Uniforms() in FilmPass