The GLKEffectPropertyFog class defines properties used to configure how fog is applied to an effect. These properties are specifically designed to mimic the fog calculations provided by OpenGL ES 1.1.


When fog is enabled, the fog component is calculated and clamped to a range from 0.0 to 1.0. Then, the fog value is used as a blending factor between the computed fragment color and the fog color.


Enabling Fog

var enabled: GLboolean

A Boolean value that indicates whether fog is applied to the fragment color.

Choosing the Fog Mode

var mode: GLint

The algorithm used to compute the density of the fog applied to the fragment color.

Fog Properties

var color: GLKVector4

The color of the fog at maximum density.

var density: GLfloat

The rate at which the fog exponent increases.

var start: GLfloat

The minimum distance in eye coordinates before fog is applied to the fragment color.

var end: GLfloat

The distance in eye coordinates where fog completely covers the color fragment.



A mode that describes how the fog component is calculated for the fragment.


Inherits From