Files
QtGameMaker/help/files/415_07_fog.html
T

46 lines
1.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Fog</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/back.gif">
<!--START-->
<h3>Fog</h3>
Fog can be used in 3D games to make objects in the distance look blurred or even disappear.
This helps in creating atmosphere and it makes it possible to not draw objects that are
far away. To enable or disable fog use the following function:
<p>
<blockquote>
<tt><b>d3d_set_fog(enable,color,start,end)</b></tt>
Enables or disables the use of fog. <tt>color</tt> indicates the fog color.
<tt>start</tt> indicates the distance at which fog must start. <tt>end</tt>
indicates the distance at which fog is maximal and nothing can be seen anymore.<br>
</blockquote>
<p>
To better understand what is happening, there are actually two types of fog, table based fog
and vertex based fog. The first type calculates fog values on a pixel basis. The second type
calculates the fog value for each vertex and then interpolates these. The first type is better
but not always supported. <i>Game Maker</i> tries to use table based fog when supported and
otherwise uses vertex based fog (unless no fog is supported). Note that certain graphics
card indicate that they can handle table based fog but offer the user the possibility to
switch this off in the advanced display settings. In this case the result might be a black
screen!
<!--END-->
</body>
</html>
<!-- KEYWORDS
fog
d3d_set_fog()
-->