Search Unity

clear mask "depth only" does not work for deferred lighting camera

Discussion in 'Scripting' started by azuretttc, Mar 17, 2011.

  1. azuretttc

    azuretttc

    Joined:
    May 8, 2009
    Posts:
    75
    The problem is :

    I have two cameras, A for the main 3d scene, B for renderering guis behind the main 3d scene. The reseon two use two cameras is GUITEXTURE and GUITEXT are always on top of the main scene.
    for A I set Clear flags to depth only, depth to -1, culling mask to the main 3D scene
    for B I set clera flags to solid color, depth to -3, culling mask to the layer I define for the guis,rendering path is forward.

    The problem is that if I set A's rendering path to forward, everything goes fine. If I set it to "deferred lighting", It seems only can see the 3D scene, and everything without any depth values becomes black and can not see the behind guis. Seems "depth only" does not work in defered lighting mode. Is that a bug on something?
     
  2. azuretttc

    azuretttc

    Joined:
    May 8, 2009
    Posts:
    75
    Is this really a bug of unity?
     
  3. azuretttc

    azuretttc

    Joined:
    May 8, 2009
    Posts:
    75
    why nobody answers?
     
  4. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    I have the same problem.. hmm
     
  5. LethalHax

    LethalHax

    Joined:
    Jul 16, 2014
    Posts:
    2
    same here. I need depth only to render stuff properly with 3 cameras. I need hdr for image effects. And I need deffered Lighting for hdr to work. the only problem is that it doesn't work