cables is under heavy development.
There might be one or another bug, please let us know about it!

Fog_v4 Op


Op author: pandur

Test Patches: 1 Test

add post processing fog (nebula) to a scene

A little advice for using post processing fog on iOS:

Due to WebGL1 being used on iOS, the depth buffer that is needed for fog calculation is not as precise as the depth buffer being used in Chrome or Firefox. Therefor it is advised to use small scenes and adjust the scene camera's near & far value (with the Perspective op as shown in the example) to only capture the scene and not exceeding the far value too much behind it.

Also, setting the near value to something greater than 0.01 (somewhere between 0.1 - 1 depending on context) can greatly increase depth buffer resolution.


render (Trigger)

trigger input


blendMode index (integer /Number)
Amount (Number)

intensity of the effect


Depth Texture (Object)

input of the depth texture

Gradient Texture (Object)

input for a gradient texture that lets you color the fog with a gradient

Background Texture (Object)

Fog Options

Fog Start (Number)

start of the fog

Fog End (Number)

end of the fog

Fog Density (Number)

density of the fog

Ignore Infinity (boolean /Number)


nearplane (Number)

near plane to be used for the fog frustum

farplane (Number)

far plane to be used for the fog frustum

Fog Color

Fog R (Number)

r channel of fog color

Fog G (Number)

g channel of fog color

Fog B (Number)

b channel of fog color

Fog A (Number)

alpha channel of fog color


trigger (Trigger)

output trigger

Caught a mistake or want to contribute to the documentation?

Edit Documentation 

Patches using Fog_v4

  • Examples
  • Public
  • My Patches


created op
2020-11-04 - simod
Ops.User.simod.Fog_v3 renamed to Ops.Gl.TextureEffects.Fog_v3
2020-11-04 - simod
cloned op from Ops.Gl.TextureEffects.Fog_v3
2022-06-07 - pandur
Ops.User.pandur.Fog_v4 renamed to Ops.Gl.TextureEffects.Fog_v4
2022-06-07 - pandur