Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Toon Liquid Sader Android build problem

Discussion in 'Shaders' started by Ramazoid, May 14, 2021.

  1. Ramazoid

    Ramazoid

    Joined:
    Mar 11, 2014
    Posts:
    8

    Attached Files:

  2. DonCornholio

    DonCornholio

    Joined:
    Feb 27, 2017
    Posts:
    86
    I would think there's something wrong with the last line in the fragment shader:
    return facing > 0 ? finalResult : topColor;

    If i understand you right, then only topColor results in Black, but the sides are colored correct?
    Try setting the graphics api manually to OpenGL ES3.
    I am not sure but from looking at Unitys Shader Library, i'd think that maybe this Semantic on the top of the Frag Shader : "fixed facing : VFACE" could be wrong in Vulkan.

    Another wild guess, if switching to OpenGL ES3 doesnt work you could try to comment out this line in the shader :
    AlphaToMask On // transparency
    and see if this helps. I remember that i had problems with alpha to mask with some unity versions.
    Did you enable MSAA fpr the build's graphic settings and on the camera ?
     
    Last edited: May 16, 2021
  3. Ramazoid

    Ramazoid

    Joined:
    Mar 11, 2014
    Posts:
    8
    if i comment this lin then object became black even in editor, in build nothing changes.OpenGLES3 checked
     
    Last edited: May 17, 2021
  4. DonCornholio

    DonCornholio

    Joined:
    Feb 27, 2017
    Posts:
    86
    Can you post a screenshot of the error in your android build? Usually the shortcut is pressing Volume- and Power Button
     
    Last edited: May 17, 2021
  5. viknesh2020

    viknesh2020

    Joined:
    Jul 19, 2016
    Posts:
    50
    @Ramazoid Did you fix this issue? I am facing the same problem even in the editor. My Unity version is 2020.3.11f1.

    Someone posted this link in Patreon, looks like it will work on Android:

    https://pastebin.com/dQzWDqXh
     
    Last edited: Feb 22, 2022