http://www.ozone3d.net/tutorials/glsl_fog/index.php
Fog Density Equations
: These equations allow to define the way fog density behaves according to the distance between the camera and a given vertex . The aim of these equations is to compute a fog factor, (the fogFactor) that will allow to mix the fragment color (at the pixel shader level) with the fog color. With fixed pipeline, there are two ways to compute the fog factor: linear or exponential.
- We will focus on the exponential method, because of its more realistic fog rendering possibilities . But keep in mind that those methods are linked to the fixed pipeline and that with the programmable pipeline we can compute totally different calculus which shall suit better to a given scene (as an example, for each color component we can set a different fog factor) .
No comments:
Post a Comment