OpenGL ES 3 – Fog

Fog effect.

Camera’s projection mode can be switched between perspective projection and orthographic projection. Camera’s position can be switched between top view and top-front view(named hover view in the video).

Fog effect can be turned on and off and the range of fog can be controlled via slider.

The type of fog implemented is linear fog and is calculated based on world space position, not the distance from the camera.

The amount of fog that affects objects in the scene varies from the start of fog range(no fog) to the end of fog range(maximum fog).

Cube objects are rendered using instancing method. Each cube object has its own scaling and translation transformation.

Platform: iOS
Programming Language: Objective-C, C/C++, GLSL
Device: iPad Air