Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Deferred shading fog on opaque objects

Discussion in 'Unity 5 Pre-order Beta' started by Brenden-Frank, Nov 12, 2014.

  1. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Hey there,

    Ran into a weird limitation where fog doesn't work with opaque objects in deferred shading. Is this going to change? Why does fog work on transparent and alphatested objects and has anyone got a workaround so far?

    My first thought is to edit the shadow with a "FinalColor" parameter.

    Thanks,

    Brenden
     
  2. mikelortega

    mikelortega

    Joined:
    Feb 5, 2014
    Posts:
    47
    I have the same problem with Unity 5.0.0b9
    Global Fog works fine with Legacy Deferred (light prepass), maybe you can use it as a workaround until it gets fixed.
    I write it down here in case someone gets to know more about it.
    Thank you.
     
  3. GeoEuclid

    GeoEuclid

    Joined:
    Sep 14, 2013
    Posts:
    20
    For deferred shading, you MUST use global fog. It doesn't take a huge hit on performance, and it does not look half bad either. You control global fog within the fog editor in 5.0 in Scene Render Settings. Global Fog.JPG
     
  4. GixG17

    GixG17

    Joined:
    Aug 18, 2013
    Posts:
    105
    Except that Global Fog is dependent on the far clipping plane...
     
  5. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    This one seriously sucks... When using Global Fog the Leaves no longer show up on my trees and when using the regular fog opaque objects are unaffected by fog...

    So this leaves me with 2 options :
    - Disable fog completely.
    - Back to forward mode.

    Which both sucks...
     
  6. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    That's odd, global fog works great here :/. Your tree, i assume speedtree?
     
  7. mikelortega

    mikelortega

    Joined:
    Feb 5, 2014
    Posts:
    47
    In Unity 5.0.0b15 I had problems with fog and some opaque objects. It only happened when the Fog Mode is Exponential or Exponential Squared, with Linear there is no problem. It could be related with the issues you are having.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    We are finding a bug with global fog and any mac running bootcamp. Will report a case after xmas as too busy atm here.