Search Unity

custom fog effect that works with objects without depth buffer

Discussion in 'Image Effects' started by snacktime, Oct 6, 2018.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    What is the current best/popular approach for fog and objects like water that don't render to depth buffer?
     
  2. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Integrate the fog effect into the shader itself. If it's a surface shader, usually it just needs to include the fog pass into the finalcolor modifier. Or if you don't mind to use stock materials that support fog, take a look at our package Dynamic Fog & Mist which includes a collection of shaders with fog parameters controlled by a single global script.