float FalloffExponent { get; set; }

robot_2Generated
code_blocksInput

Description

The FalloffExponent property of the CubemapFogController class defines the exponent used for calculating the distance falloff of the fog effect. This property determines how the fog density decreases with distance from the player. A higher exponent value results in a steeper falloff, meaning the fog will become less dense more quickly as the distance increases. For example, setting this property to 2.0 will make the fog density decrease proportionally to the square of the distance.

Usage

To use the FalloffExponent property, you can set it to a float value that represents the desired falloff exponent. This value should be greater than or equal to zero. A typical use case might involve adjusting this property to achieve the desired visual effect for the fog in your scene.

Example

// Example of setting the FalloffExponent property
CubemapFogController fogController = new CubemapFogController();
fogController.FalloffExponent = 2.0f; // Sets the falloff to be proportional to the square of the distance

// Adjusting the falloff for a more gradual effect
fogController.FalloffExponent = 1.0f; // Linear falloff

// Setting a higher value for a steeper falloff
fogController.FalloffExponent = 3.0f; // Cubic falloff