Fog_v4 Op
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.
- Ops.Gl.ImageCompose.Fog_v4
- Core Op - Official cables op
- MIT
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
Example Patch fog example
INPUT PORTS
trigger input
Blending
intensity of the effect
Textures
input of the depth texture
input for a gradient texture that lets you color the fog with a gradient
Fog Options
start of the fog
end of the fog
density of the fog
Frustum
near plane to be used for the fog frustum
far plane to be used for the fog frustum
Fog Color
r channel of fog color
g channel of fog color
b channel of fog color
alpha channel of fog color
OUTPUT PORTS
output trigger
Patches using Fog_v4
Changelog
created op | simod - 2020-11-04 12:07 | |
Ops.User.simod.Fog_v3 renamed to Ops.Gl.TextureEffects.Fog_v3 | simod - 2020-11-04 12:14 | |
cloned op from Ops.Gl.TextureEffects.Fog_v3 | pandur - 2022-06-07 17:29 | |
Ops.User.pandur.Fog_v4 renamed to Ops.Gl.TextureEffects.Fog_v4 | pandur - 2022-06-07 17:33 | |
rename | Ops.Gl.TextureEffects.Fog_v4 renamed to Ops.Gl.ImageCompose.Fog_v4 | pandur - 2023-12-06 10:25 |