Search Unity

a weird problem about alphatest

Discussion in 'Shaders' started by SimonXue, Oct 23, 2014.

  1. SimonXue

    SimonXue

    Joined:
    Oct 23, 2014
    Posts:
    3
    Hi, there

    I wrote a very simple shader of alphatest, for some reason, I use HLSL instead of surface shader, then I meet a very strange problem:

    I choose PC platform(pic 1.jpg) first in build setting window, and run the demo in Editor, everything is OK, the AlphaTest work normally.

    then, I switch platform to Android(pic 2.jpg) and run the demo in Editor again, then something strange happened(pic 3.jpg), it seems the transparent area of the leaves blocked other leaves behind it, but other object behind it(sphere) is OK, it seems there are some rendering order problem in it , but my shader is very simple, i don't know the reason, so i upload the unitypackage, please help me check it.

    thanks!
     

    Attached Files:

  2. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
  3. SimonXue

    SimonXue

    Joined:
    Oct 23, 2014
    Posts:
    3