mrdoob/three.js — pull request #2755 by paulkaplan (2012-12-05 20:42:31+00:00)
Title: Particle Depth Material

Based on [this SO question](http://stackoverflow.com/questions/13715266/depth-map-for-particle-system-using-a-texture-map/13719363#13719363), there seemed to be a need for a depth material that would respect the textures mapped onto particles. I added it, called ParticleDepthMaterial, and factored out some of the repeated code with the regular depth material. Basically it just uses the alpha channel of the texture combined with the grayscale of the depth.

Also added an example for the ParticleDepthMaterial, as well as a webgl demo of the MeshDepthMaterial because there is only a canvas one. I did that mostly to make sure I didn't break the regular depth material.