Fog Shader


A shader that makes fog using depth.

Look at my code
  • GitHub


  • How it works.

    The fog:

    The fog shader changes the alpha of a plane depending on how far away the objects behind it is.

    Fog height differences:

    By changing the fog intensity in the variables you can change the intensity of the fog. Using a gradient noise texture and subtracting the color value to the intensity the fog appears to have different heights in it.



  • Back