421

Working with Fog
Linear Fog

  • LinearFog extends the Fog class
  • Thickness increases linearly with distance
  • Use linear fog to create more easily controlled fog, though less realistic

  • Set front and back distances to control density

    effect = (back - distance) / (back - front)
    color = effect * shapeColor + (1-effect) * fogColor