float FalloffExponent { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

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

Usage

To use the FalloffExponent property, you need to have an instance of the CubemapFogController class. You can then set or get the FalloffExponent to control how the fog effect diminishes with distance.

Example usage:

// Create an instance of CubemapFogController
CubemapFogController fogController = new CubemapFogController();

// Set the falloff exponent to 2.0 for a quadratic falloff
fogController.FalloffExponent = 2.0f;

// Retrieve the current falloff exponent
float currentExponent = fogController.FalloffExponent;

Example

// Create an instance of CubemapFogController
CubemapFogController fogController = new CubemapFogController();

// Set the falloff exponent to 2.0 for a quadratic falloff
fogController.FalloffExponent = 2.0f;

// Retrieve the current falloff exponent
float currentExponent = fogController.FalloffExponent;