Global Fog
Manual     Reference     Scripting   
Reference Manual > Components > Image Effect Scripts > Global Fog

Global Fog

The Global Fog image effect creates camera based exponential fog. All calculations are done in world space which makes it possible to have height based fog modes that can be used for more interesting effects (see example).


Global fog example demonstrating both distance and height based fog

Example for cheating athmospheric effects using the global fog effect

As with the other image effects, this effect is only available in Unity Pro. Make sure to have the Pro Standard Assets installed.

Properties

Fog ModeChose the type of fog: distance, height based or both
Start DistanceIn world space units, the distance when fog starts fading in.
Global DensityThe fog density that fades between the color buffer and the Fog Color.
Height ScaleHow the fog density fades when height based fog is chosen.
HeightThe y world space position when the fog starts fading in.
Global Fog ColorThe fog color the color buffer will be blended to.

Hardware support

This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. Additionally, depth texture support is required. PC: NVIDIA cards since 2004 (GeForce 6), AMD cards since 2004 (Radeon 9500), Intel cards since 2006 (GMA X3000); Mobile: OpenGL ES 2.0 with depth texture support; Consoles: Xbox 360, PS3.

All image effects automatically disable themselves when they can not run on end-users graphics card.

Page last updated: 2011-06-12