# SetFogMode

## Description

Sets 3D fog on or off, this can be used to create an atmospheric haze or fade objects to the background color to simulate reduced visibility. Fog will be automatically applied to all 3D objects if they are using the default shader. If you have applied your own shader with SetObjectShader then declare the function mediump vec3 ApplyFog( mediump vec3 color, highp vec3 pointPos ); in the pixel shader which AGK will fill in for you at run time. pointPos is the pixel position in world coordinates, which you will need to pass in from the vertex shader.

## Definition

SetFogMode( mode )

void agk::SetFogMode( int mode )

## Parameters

- mode - 1 to turn fog on, 0 to turn it off.