Skip to content
YVT edited this page Jun 19, 2017 · 1 revision

Fog Equation

The VoxLap engine, which is used by the original Ace of Spades, implements the fog as the linear blending (without gamma correction) between the base color and the fog color. The blending factor is calculated using the following equation, where D represents the fog distance and x and x_e represents the location of an object and the camera respectively:

TODO: volumetric rendering equation, approximation used by OpenSpades, and gamma correction