Torque Shader Engine DocumentationCVS Revision Label 0.1.x |
Fog is calculated on a per-vertex basis in the ps 2.0 rendering path. The gridSize can affect how the fog looks if the fog is fairly close in. The Grid section covers this in more detail. The fog uses the fog texture generated by the scenegraph for consistency with the rest of the scene.
The ps 1.1 path is rendered as a second pass over the bumpEnvMap pass. It uses a stencil operation to avoid z-fighting on the surface over large areas. A special fog mesh is generated for this path. It is a radial mesh (a set of linked concentric rings) that expands as it gets further out to reduce vertices. Rendering of the fog mesh can be turned off by setting the "renderFogMesh" parameter to false.