In my Learning Three.js book Chapter Eleven 02-post-processing-simple-passes.html, the author was able to make a noise animation from var effectFilm = new THREE.FilmPass(0.8, 0.325, 256, false);
In the book's code example the orbiting is not causing the noise effect, because when I remove the orbit animation, the noise animation is still there. It's not coming from the textures, because when I remove them, the noise effect is still there.
I'm dieing to figure out how this was done just from using THREE.FilmPass().
I've tried using THREE.FilmPass() in my own experiment and I can not make the noise effect. Instead, I just get the normal scan line effect without the noise.
What I am doing different is: 1) I am using a 2d geometry instead of 3d geometry, 2) not using 2 cameras 3) not using directional lights, 4) not reusing my geometry with THREE.CopyShader, 5) not using orbiting.
function init() {
var stats = initStats();
var scene = new THREE.Scene();
var camera = new THREE.OrthographicCamera(-window.innerWidth, window.innerWidth, window.innerHeight, -window.innerHeight, -10000, 10000);
scene.add(camera);
var renderer = new THREE.WebGLRenderer();
renderer.setClearColor(new THREE.Color(0xEEEEEE, 1.0));
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.shadowMapEnabled = true;
var coupleTexture = THREE.ImageUtils.loadTexture('./sina1.jpg');
var planeGeometry = new THREE.PlaneGeometry(1, 1);
var planeMaterial = new THREE.MeshBasicMaterial({map: coupleTexture,
depthTest: false });
var plane = new THREE.Mesh(planeGeometry, planeMaterial);
plane.scale.set(1000, 1000, 1, 1);
scene.add(plane);
document.getElementById("WebGL-output").appendChild(renderer.domElement);
var renderPass = new THREE.RenderPass(scene, camera);
var effectFilm = new THREE.FilmPass(0.8, 0.325, 256, false);
effectFilm.renderToScreen = true;
var composer = new THREE.EffectComposer(renderer);
composer.addPass(renderPass);
composer.addPass(effectFilm);
render();
function render() {
stats.update();
requestAnimationFrame(render);
composer.render(scene, camera);
}