FogFalloff

Linear

  • start : f32
  • end : f32

Exponential

  • density : f32

ExponentialSquared

  • density : f32

Atmospheric

  • extinction : glam::Vec3
  • inscattering : glam::Vec3

Description

Allows switching between different fog falloff modes, and configuring their parameters.

Convenience Methods

When using non-linear fog modes it can be hard to determine the right parameter values for a given scene.

For easier artistic control, instead of creating the enum variants directly, you can use the visibility-based convenience methods:

  • For FogFalloff::Exponential:

    • [FogFalloff::from_visibility()]
    • [FogFalloff::from_visibility_contrast()]
  • For FogFalloff::ExponentialSquared:

    • [FogFalloff::from_visibility_squared()]
    • [FogFalloff::from_visibility_contrast_squared()]
  • For FogFalloff::Atmospheric:

    • [FogFalloff::from_visibility_color()]
    • [FogFalloff::from_visibility_colors()]
    • [FogFalloff::from_visibility_contrast_color()]
    • [FogFalloff::from_visibility_contrast_colors()]

Functions