Fog_v4 Op

Fog

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.


Full Name
  • Ops.Gl.ImageCompose.Fog_v4
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


INPUT PORTS


render (Trigger)

trigger input

Blending

blendMode index (Number:integer )
Amount (Number)

intensity of the effect

Textures

Depth Texture (Object:texture)

input of the depth texture

Gradient Texture (Object:texture)

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

Background Texture (Object:texture)

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 (Number:boolean )

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

OUTPUT PORTS


trigger (Trigger)

output trigger


Patches using Fog_v4

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarsimod - 2020-11-04 12:07
Ops.User.simod.Fog_v3 renamed to Ops.Gl.TextureEffects.Fog_v3user avatarsimod - 2020-11-04 12:14
cloned op from Ops.Gl.TextureEffects.Fog_v3user avatarpandur - 2022-06-07 17:29
Ops.User.pandur.Fog_v4 renamed to Ops.Gl.TextureEffects.Fog_v4user avatarpandur - 2022-06-07 17:33
renameOps.Gl.TextureEffects.Fog_v4 renamed to Ops.Gl.ImageCompose.Fog_v4user avatarpandur - 2023-12-06 10:25