away3d/away3d-core-fp11 — pull request #603 by MaxDidIt (2013-07-04 19:29:57+00:00)
Title: Added a material which renders silhouettes over obstructing objects.

- added SilhouetteMaterial.as. SilhouetteMaterial uses SilhouetteMaterialPass.as to first render the silhouette over obstructing objects, then the actual object. SilhouetteMaterial.as currently extends ColorMaterial.
- added SilhouetteMaterialPass.as. SilhouetteMaterialPass sets the compare mode to GREATER in the activate function and prevents the pass to write into the depth buffer.

**[Preview of the Effect](http://www.max-did-it.com/projects/silhouette/)**

This effect is based on the method described in: [Rendering Silhouettes For Concealed Objects](http://www.max-did-it.com/index.php/2013/02/25/rendering-silhouettes-for-concealed-objects/)

The section about using the effect with Away3D in the article is inaccurate. I wrote the article at a point where I neither knew about Context3D.setDepthTest() (A question on StackOverflow yielded no answer) nor about the renderOrderID in MaterialBase.

I will write an update about this on my blog.