|
#define FOG_MODE_AUTO 1
#define FOG_MODE_VERTEX 2
#define FOG_START_DISTANCE_DEFAULT -1
*** very useful
Controls the fog parameters. Fog can be used
to create night time effect, fog effect and under water effect.
These different effects are set by selecting a different color for the fog
Parameters:
ON_or_OFF: could be ON or OFF. The default is OFF
Using fog would usually increase the world realism
without costing too much in terms of frames per second
If OFF is given then the rest of the parameters are ignored
red, green, blue:
The fog color. Gray shades such as (128,128,128) or (200,200,200) etc always look good.
Try also colors that are similar to the average world color.
For making a night time effect set fog color to black -(0,0,0)
For blue sky colors such as (200,200,230) would give a much natural result
then 0,0,255 (which would give an under water effect
fog_mode:
Could be one of the following FOG_MODE_AUTO, FOG_MODE_VERTEX
If FOG_MODE_VERTEX is selected then the fog is controled manually using the function
STATE_point_set_fog()
max_visible_distance:
Beyond this distance the fog is 100% thick and nothing is seen
This parameter is only relevant when FOG_MODE_AUTO is selected
fog_start_distance:
Closer then this distnace, fog has no effect.
If FOG_START_DISTANCE_DEFAULT is given then fog_start_distance
Would be automatically set to max_visible_distance/20
fog_type:
reserved for future use
See also:
STATE_point_set_fog()
Example A:
switch fog on
STATE_engine_set_fog(ON, 200, 200, 200, FOG_MODE_AUTO, 1000000, FOG_START_DISTANCE_DEFAULT, 0);
Example B:
switch fog off. This saves rendering time. The rest of the parameters are ignored
STATE_engine_set_fog(OFF, 200, 200, 200, FOG_MODE_AUTO, 1000000, FOG_START_DISTANCE_DEFAULT, 0);
|