Search Unity

Problem with shadows overlapping the object when the normal is reversed

Discussion in 'Shaders' started by SebaGioseffi, Oct 18, 2013.

  1. SebaGioseffi

    SebaGioseffi

    Joined:
    Oct 18, 2013
    Posts:
    7
    Hi, I have been trying to find a cut-out shader that supports casting and receiving shadows. I found a couple of shaders that fullfilled the requirements, (like this one: http://wiki.unity3d.com/index.php/Transparent_Diffuse_Two_Pass_Lit_Shadows) but almost all them showed problems sorting the image itself and its shadow. This particular shader draws the shadow first when the object is flipped (when the normal is reversed). Here is a screenshot of what is looks like:



    Does anyone know how this could be fixed? Or perhaps someone can think of a different way of doing this?

    By the way I am using Unity Pro, version 3.5.7.
     

    Attached Files:

  2. SebaGioseffi

    SebaGioseffi

    Joined:
    Oct 18, 2013
    Posts:
    7
    NeatWolf likes this.