RenderStateManager.RangeFogEnable Property |
Language: |
Retrieves or sets enabling of range-based vertex fog.
Visual Basic Public Property RangeFogEnable As Boolean C# public bool RangeFogEnable { get; set; } C++ public:
property bool RangeFogEnable {
bool get();
void set(bool value);
}JScript public function get RangeFogEnable() : boolean
public function set RangeFogEnable(boolean);
System.Boolean
This property is read/write.
Set to true to enable range-based vertex fog, or false to use depth-based fog.
The default value is false.
In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene. All fog methods work as usual, except that they use range instead of depth in the computations.
Range is the correct factor to use for fog computations, but depth is commonly used instead because it is generally already available, and range is resource-intensive to compute. Using depth to calculate fog has the undesirable effect of making the fogginess of peripheral objects change as the viewer's eye moves; in this case, the depth changes and the range remains constant.
Because no hardware currently supports per-pixel range-based fog, range correction is offered only for Vertex Fog.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.