Experimenting with three.js and working through the NeHe demos. Number 9 loads a non-transparent JPG. The JPEG is mainly black and acts as a mask. A series of overlapped objects should blend together with only the white areas of the objects being rendered. In OpenGL (old style) the code (in Java) is:
Texture t = TextureIO.newTexture(getResource(filename), mipmap, null);
t.setTexParameteri(GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
t.setTexParameteri(GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
in three.js I have tried
var material = new THREE.MeshBasicMaterial({
map:starTexture,
depthWrite: false,
side:THREE.DoubleSide,
blending: THREE.NormalBlending
});
And a number of variants. But I get ALMOST but quite the right result. I get mask effect but the rectangular shape of the JPG clips the overlapping series of images.