Search Unity

Unlit Vertext/Fragment shaders don't work on Android

Discussion in 'Shaders' started by falldeaf_unity, Dec 17, 2019.

  1. falldeaf_unity

    falldeaf_unity

    Joined:
    Jul 27, 2016
    Posts:
    35
    Surface shaders that I've written seem to show up OK (And if there were problems, using ADB logcat outputted errors, but all of my Vertex/Fragment shaders that I wrote on windows 10 that work in the game view in Unity all break on Android.

    In-game on Android the planes that they should show up on are just not there (no black or pink colors) and the ADB logcat command "adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG" doesn't output any errors at all.

    I'm not even sure where to start debugging this, I've been googling "Android vertex/fragment shaders" to see if there's something I'm missing without success.
     
  2. falldeaf_unity

    falldeaf_unity

    Joined:
    Jul 27, 2016
    Posts:
    35
    Ok I wish I had a better answer than this because I'm not sure why this fixed it but, I changed this subshader settings:
    Blend One OneMinusSrcAlpha
    to these:
    Cull Off
    Lighting Off
    ZWrite Off
    ZTest[unity_GUIZTestMode]
    Blend SrcAlpha OneMinusSrcAlpha

    In case that helps anyone else.