Planet

Author: Nils Daumann.

Description


This shader adds an atmosphere to a a planet as you can see it on the screenshots. To do so, it renders the object in another pass which extrudes the vertices along its normals. In this pass, only the back of the polygons is rendered which results in the outline, which is than faded our t using a couple of dot products. The Unity 3 Version supports only one point light and doesn´t work without. No ambient. Not tested with the deferred pipeline.

Works on fragment program capable cards (Radeon 9500+, GeForce FX+, Intel 9xx). Supports fog and shadows (Unity 2 version only).

Usage



 * Texture is mapped on the object using its uv set (Tiling and Offset works!).
 * Color is used as ambient color.
 * Atmosphere Color is the color of the atmosphere.
 * Size is the size of the atmosphere. It is scaled in object space, which means that it will be scaled with the model. Size is the thicknes in units*scale.
 * Falloff defines the fading of the atmosphere.
 * Falloff Planet defines the same for the planet surface.
 * Transparency defines how transparent the atmosphere is.
 * Transparency Planet defines the strength fading into the atmospheres color of the planet surface.

Download Unity 3
[[Media:PlanetU3.zip]]

Download Unity 2
[[Media:Planet.zip]]