Search Unity

the image effect EdgeDetectEffectNormal didn't work correct

Discussion in 'Editor & General Support' started by iverson, Nov 1, 2011.

  1. iverson

    iverson

    Joined:
    Dec 27, 2008
    Posts:
    81
    the image effect of EdgeDetectEffectNormal just work on the object which is diffuse,if the object is using a shader that have the "RenderType"="Transparent",the edge detect will not work.
    ? why?
     
  2. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    The effect does not work on alpha blended objects because they don't write into the depth buffer. Alpha cutout shaders do however so if you can switch to one of those it will work.
     
  3. iverson

    iverson

    Joined:
    Dec 27, 2008
    Posts:
    81
    but i have do something test.i write a simple shader,the object only Edge detected when i write "RenerTye="Opaque" or "RenderType=TransparentCutout" in the shader.(all other things in the two shaders are the same)
    so, do u mean that the only the RenderType=Opaque and RenderType=TransparentCutout can cause writing into the depth buffer?