I have a query about comparing two textures at a pixel level in three.js. I am unsure of how to achieve this as the documentation for Three.js does not provide clear answers, with some classes remaining undocumented.
In summary, I am looking to determine the difference between two images (for calculating a fitness value in my genetic algorithm).
Edit: I have received advice to include more details. Here is some additional information:
One of the textures is loaded from an image file using "loadTexture":
referenceTexture = THREE.ImageUtils.loadTexture('images/tia1.jpg'); //256px*256px image
The second texture is generated by adding polygons to a separate scene and rendering that scene into a texture:
var bufferScene = new THREE.Scene();
var bufferTexture = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter,format: THREE.RGBAFormat});
bufferScene.add(triangle) //This is a loop in the actual code.
renderer.setSize(256,256);
requestAnimationFrame( render );
renderer.render(bufferScene, camera, bufferTexture);
Thank you in advance for your assistance.