Search Unity

Help Wanted Normal Maps from shadergraph get flipped on Android

Discussion in 'Shader Graph' started by Horus_Sungod42, May 31, 2019.

  1. Horus_Sungod42

    Horus_Sungod42

    Joined:
    Oct 30, 2014
    Posts:
    75
    Hello, when building on an android phone, the normal map's red or green channel flip or otherwise have incorrect values, depending of the orientation of the object (or the face).

    The normal maps are saved in ETC2 in android.

    This only affects the shaders made from the shadergraph, not the LW standard shader. Both materials used the exact same normal map

    Is this a known issue? Is there a magic button that tells the shadergraph to behave when built on android?

    This has been tested with shaders made in an older versions, as well as a shader made entirely in the newest version.

    Tested both in a 3D project made into LWRP and the Template for LWRP

    Tested with several versions of the shadergraph, as well as several versions of Unity, including 2019.3 and LWRP 6.7 and the Verified version of the LWRP on 2019.1. It was tested on a few years old android samsung tablet, as well as a Huawei phone from 2018.


    ---

    In each image, the 2 cubes on the right are the standard shaders, and are identical to their PC counterparts.
    The 2 cubes on the left of each image are very basic materials made in the shadergraph. Observe next to the red arrow that one of the normal map's channel's value is inverted.

    beep.jpg
     
  2. Horus_Sungod42

    Horus_Sungod42

    Joined:
    Oct 30, 2014
    Posts:
    75
    Though it might actually not be the normal maps at all, but rather how the specular and/or the reflection probe function on the shadergraph when built on android.

    This happens even when the PBR master node's smoothness is not connected with any node, and has a static value of 0.5

    Guilty reflections?
    beep.jpg

    Normal maps seem fine.
    beep.jpg
     
    Last edited: May 31, 2019
  3. Horus_Sungod42

    Horus_Sungod42

    Joined:
    Oct 30, 2014
    Posts:
    75
    Bug posted, too. (Unless I'm a dummy and there is a special setting used to force the shadergraph to work when actually build on android)
     
unityunity