416

Working with Fog
Exponential Fog

  • ExponentialFog extends the Fog class
  • Thickness increases exponentially with distance
  • Use exponential fog to create thick, realistic fog

  • Vary fog density to control thickness

    effect = e(-density * distance)
    color = effect * shapeColor + (1-effect) * fogColor