##### Ninja Library - Special Effects Function

# njGenerateFogDensity

Gets fog density from front 255/f to back f

### FORMAT

`

  Uint32 njGenerateFogDensity( f )
  Float f

`

### PARAMETER

  `f` | Fog rear boundary

### RETURN

  Fog density

### DESCRIPTION

  Gets the fog density from front 255/f to back f.

### EXAMPLE

      The following generates white fog from -255/4000 to rear -4000.
      Uint32 fdensity;
      NJS_FOG_TABLE fog;
      njSetFogColor(0xffffffff);
      fdensity = njGenerateFogDensity(-4000,f);
      njSetFogDensity(fdensity);
      njSetFogTable(fog);
      njFogEnable();
      /* Draw model etc. */
      njFogDisable();

### NOTE

  The fade function cannot be used for the same object.

  The example above only explains the flow of the fog feature, and therefore, it is not for actual use. |

### REFERENCE

  `njSetFogColor()
  njSetFogDensity()
  njGenerateFogTable()
  njGenerateFogTable2()
  njGenerateFogTable3()
  njSetFogTable()
  njFogEnable()
  njFogDisable()
  `

njGenerateFogDensity

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999