mrdoob/three.js — pull request #5402 by kintel (2014-10-03 22:45:08+00:00)
Title: Depthtextures

This adds support for depth textures to three.js, fixing issue #5308

Usage:
```
var depthTexture = new THREE.DepthTexture(window.innerWidth, window.innerHeight, true); // True means attach a stencil buffer
var rtTexture = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, {
, depthTexture: depthTexture } );
```

It's also possible to pass your own texture instead of letting WebGLRenderTarget create one.

TODO before merge:
* [ ] Documentation / usage
* [ ] Look into mipmapping and cubemaps
* [ ] More testing