Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

RenderSettings.fogDensity

static var fogDensity: float;
static float fogDensity;
static fogDensity as float

Description

The density of the exponential fog.

Fog density is used by Exponential and ExponentialSquared modes.

	/// Set for density
	RenderSettings.fogDensity = 0.1;
	// And enable fog
	RenderSettings.fog = true;

See Also: RenderSettings.fogMode, Render Settings manager.