text: /**
   * @author alteredq / http://alteredqualia.com/
   */
  
  B3D.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount, grayscale ) {
  
  	B3D.Pass.call( this );
  
  	if ( B3D.FilmShader === undefined )
  		console.error( "B3D.FilmPass relies on B3D.FilmShader" );
  
  	var shader = B3D.FilmShader;
  
  	this.uniforms = B3D.UniformsUtils.clone( shader.uniforms );
  
  	this.material = new B3D.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 B3D.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
  	this.scene  = new B3D.Scene();
  
  	this.quad = new B3D.Mesh( new B3D.PlaneBufferGeometry( 2, 2 ), null );
  	this.quad.frustumCulled = false; // Avoid getting clipped
  	this.scene.add( this.quad );
  
  };
  
  B3D.FilmPass.prototype = Object.assign( Object.create( B3D.Pass.prototype ), {
  
  	constructor: B3D.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 );
  
  		}
  
  	}
  
  } );
  