float DrawDistance { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The DrawDistance property of the VolumetricFogParameters class specifies the maximum distance at which the volumetric fog is rendered. This property is a float value representing the distance in world units.

Usage

To adjust the draw distance of the volumetric fog, set the DrawDistance property to the desired value. This can be useful for optimizing performance by limiting the rendering of fog to a certain distance, or for achieving specific visual effects.

Example

// Example of setting the draw distance for volumetric fog
VolumetricFogParameters fogParameters = new VolumetricFogParameters();
fogParameters.DrawDistance = 1000.0f; // Set the draw distance to 1000 units

// Use the fog parameters in your scene
Scene.Current.AddComponent(fogParameters);