Unified Distance Formulas for Halfspace Fog

Eric Lengyel
Terathon Software

This paper appears in issue Volume 12, Number 2.
Purchase this issue from the akpeters.com web site.

Abstract

In many real-time rendering applications, it is necessary to model a fog volume that is bounded by a single plane but is otherwise infinite in extent. This paper presents unified formulas that provide the correct distance traveled through a fog halfspace for all possible camera and surface point locations. Such formulas effectively remove the need to code for multiple cases separately, thereby achieving optimal fragment shading performance on modern rendering hardware.

Author Information

Eric Lengyel, 1986 Esterel Way, Sacramento, CA 95832 lengyel@terathon.com

BibTeX Entry

@article{Lengyel07,
  author = "Eric Lengyel",
  title = "Unified Distance Formulas for Halfspace Fog",
  journal = "journal of graphics tools",
  volume = "12",
  number = "2",
  pages = "23-32",
  year = "2007",
}