A collection of shaders written in CG/ShaderLab for Unity used in the development of Poi.
The default Unity shader for transparent objects suffers from some overlapping issues on complex objects (as seen on the left). This shader fixes the problem by rendering the object in two passes (the opaque center image is for reference).
This simple two-pass shader renders a silhouette on top of all other geometry when occluded. We used this effect in Poi for objects that weren't marked as camera occluders so players would always be able to see the character.
A basic shader to render a two-colored checkerboard pattern using the existing vertex UV coords.
Sometimes you want to render both sides of an object (for example, if it's not totally convex or perhaps it's an animated plane used for a flag).
This image effect takes a normal map as input and applies it to the screen as a post-process. The normal map will always be centered and scaled appropriately independent of aspect ratio and window resolution. We used this effect for the telescope item in Poi, but it would also work great for sniper scopes, etc.