beta
cables is under heavy development.
There might be one or another bug, please let us know about it!
add post processing fog (nebula) to a scene

summary (oneliner)

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.

doc

issues

youtube id

collections

related ops

Inputs

render (Trigger)

trigger input


blendMode index (integer /Number)

Blending

blendMode (string /Number)

choose between different blend modes


Amount (Number)

intensity of the effect


Textures

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


Frustum

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


Outputs

trigger (Trigger)

output trigger


Caught a mistake or want to contribute to the documentation?

Edit Documentationcancel save
Fog - Example:

Example patch for the fog post processing effect.



Credits


Changelog


created op
2020-11-04 - simod

Ops.User.simod.Fog_v3 renamed to Ops.Gl.TextureEffects.Fog_v3
2020-11-04 - simod

Examples using Fog_v3

Public Patches using Fog_v3