Search Unity

GLSL link error: L0010 Uniform '_...' differ on precision

Discussion in 'Android' started by euspensky, Mar 5, 2019.

  1. euspensky

    euspensky

    Joined:
    May 25, 2018
    Posts:
    4
    We are doing 3d game mobile game, and recently started to receive strange errors from Android devices. It does not always happen, and we cant reproduce it on devices we have at hand. (They are MYA-U29 and GT-I9300)
    Unity version is 2018.3.6f1

    Searching on internets provided very sparse information (namely only this stackoverflow question)
    Variable names listed in error are not used in our shaders, and are only found in Unity library, so we cant rename them.

    Did anyone encounter this problem? Can you give some directions?


    -------- GLSL link error: L0010 Uniform '_ProjectionParams' differ on precision #0 0x9cc80b64 (libunity.so) ? 0x470b64 #1 0x9c8e884c (libunity.so) ? 0xd884c #2 0x9ced9a80 (libunity.so) ? 0x6c9a80 #3 0x9cec1fd4 (libunity.so) ? 0x6b1fd4 #4 0x9cec04e4 (libunity.so) ? 0x6b04e4 #5 0x9cebf530 (libunity.so) ? 0x6af530 #6 0x9c96f570 (libunity.so) ? 0x15f570 #7 0x9cb3dab8 (libunity.so) ? 0x32dab8 #8 0x9cb56880 (libunity.so) ? 0x346880 #9 0x9cb56130 (libunity.so) ? 0x346130 #10 0x9cb55ce0 (libunity.so) ? 0x345ce0 #11 0x9cb55a20 (libunity.so) ? 0x345a20 #12 0x9cb57d98 (libunity.so) ? 0x347d98 #13 0x9c8c865c (libunity.so) ? 0xb865c #14 0x9c8c8940 (libunity.so) ? 0xb8940 #15 0x9cabcc9c (libunity.so) ? 0x2acc9c #16 0x9cabef5c (libunity.so) ? 0x2aef5c #17 0x9cabf898 (libunity.so) ? 0x2af898 #18 0x9cabfc84 (libunity.so) ? 0x2afc84 #19 0x9c8c9068 (libunity.so) ? 0xb9068 #20 0x9c9d05d0 (libunity.so) ? 0x1c05d0 #21 0x9cd024c8 (libunity.so) ? 0x4f24c8 #22 0x9cfa2a4c (libunity.so) ? 0x792a4c #23 0x9cfa4c48 (libunity.so) ? 0x794c48 #24 0x9ccfff10 (libunity.so) ? 0x4eff10 #25 0x9ccfcc30 (libunity.so) ? 0x4ecc30 #26 0x9ccff988 (libunity.so) ? 0x4ef988 #27 0x9ccfdff4 (libunity.so) ? 0x4edff4 #28 0x9ccffbec (libunity.so) ? 0x4efbec #29 0x9cba5e60 (libunity.so) ? 0x395e60 #30 0x9cb7e10c (libunity.so) ? 0x36e10c #31 0x9cb7e144 (libunity.so) ? 0x36e144 #32 0x9cb7e318 (libunity.so) ? 0x36e318 #33 0x9ca9bd44 (libunity.so) ? 0x28bd44 #34 0x9ca96024 (libunity.so) ? 0x286024
    -------- GLSL link error: L0010 Uniform '_WorldSpaceLightPos0' differ on precision #0 0x9cc80b64 (libunity.so) ? 0x470b64 #1 0x9c8e884c (libunity.so) ? 0xd884c #2 0x9ced9a80 (libunity.so) ? 0x6c9a80 #3 0x9cec1fd4 (libunity.so) ? 0x6b1fd4 #4 0x9cec04e4 (libunity.so) ? 0x6b04e4 #5 0x9cebf530 (libunity.so) ? 0x6af530 #6 0x9c96f570 (libunity.so) ? 0x15f570 #7 0x9cb3dab8 (libunity.so) ? 0x32dab8 #8 0x9cb3ec04 (libunity.so) ? 0x32ec04 #9 0x9cb3efa4 (libunity.so) ? 0x32efa4 #10 0x9cb469a4 (libunity.so) ? 0x3369a4 #11 0x9cb44bc4 (libunity.so) ? 0x334bc4 #12 0x9cb44b10 (libunity.so) ? 0x334b10 #13 0x9cb5556c (libunity.so) ? 0x34556c #14 0x9cb49adc (libunity.so) ? 0x339adc #15 0x9ca41eb0 (libunity.so) ? 0x231eb0 #16 0x9cc781a8 (libunity.so) ? 0x4681a8 #17 0x9cc69428 (libunity.so) ? 0x459428 #18 0x9cc696e0 (libunity.so) ? 0x4596e0 #19 0x9cb7e10c (libunity.so) ? 0x36e10c #20 0x9cb7e144 (libunity.so) ? 0x36e144 #21 0x9cb7e318 (libunity.so) ? 0x36e318 #22 0x9ca9bd44 (libunity.so) ? 0x28bd44 #23 0x9ca96024 (libunity.so) ? 0x286024
     
    Last edited: Mar 5, 2019
    cdr9042 likes this.
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    On which Unity version does this happen?
     
  3. euspensky

    euspensky

    Joined:
    May 25, 2018
    Posts:
    4
    We are using unity 2018.3.6f1
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    Please submit a bug report.
     
  5. Nikhil12

    Nikhil12

    Joined:
    Jun 1, 2015
    Posts:
    29
    Did you find the solution? I am getting the same error while building a Ar app
     
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    I don't know if this bug report was ever submitted, I don't think I've seen it.
     
  7. bYsdTd

    bYsdTd

    Joined:
    Nov 17, 2015
    Posts:
    3
    i am also meet this problem
     
  8. linguangya

    linguangya

    Joined:
    Aug 12, 2013
    Posts:
    7
    I got this error on red mi
    D OpenSSLLib: OpensslErr:Module:13(114:155); file:external/openssl/crypto/asn1/asn1_lib.c Line:142;Function:ASN1_get_object
    D dalvikvm: threadid=39: interp stack at 0x63a71000
    E Unity : -------- GLSL link error: L0010 Uniform '_ProjectionParams' differ on precision
     
  9. shenle04517

    shenle04517

    Joined:
    Sep 19, 2017
    Posts:
    18
    i am also meet this problem
     
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    Did anyone report this bug?
     
  11. shenle04517

    shenle04517

    Joined:
    Sep 19, 2017
    Posts:
    18
    i cant reproduce it on devices i have at hand,and it happend on my release game on google play.This bug is mostly(>80%) occurred on android devices api level below 23(android 6.0).The stack like :
    # main(1)
    UnityLogError
    -------- GLSL link error: L0010 Uniform 'hlslcc_mtx4x4unity_WorldToLight' differ on precision
    UnityEngine.Application.CallLogCallback(String, String, LogType, Boolean).

    I can only find variable 'WorldToLight' from unity built in shaders instead of my shader code and I can't find any variable named 'hlslcc_mtx4x4unity_WorldToLight'

    devices meet this problem,not all
    upload_2019-8-25_8-38-58.png
     
    Last edited: Aug 25, 2019
  12. shenle04517

    shenle04517

    Joined:
    Sep 19, 2017
    Posts:
    18
    my unity version was 2018.4.1f1.
    now I use unity 2018.4.5f1.Then the link error from variable 'hlslcc_mtx4x4unity_WorldToLight' changes to '_ClipArgs1'.
    still no idea , help plz.
     
  13. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    244
    We are experiencing this as well
     
  14. xxluky

    xxluky

    Joined:
    Dec 4, 2014
    Posts:
    19
    Hello, I also have the similar bug: Console on my Android mobile is saying: "glsl link error uniform _glossiness differ on precision". This error pops up when game starts but only sometimes. I also have this error on Particle System explosion where dealing with a big Atlas image 4096x4094 in real but in Unity inspector is set Max Size to 2048x2048.
    Only happening on phone using OpenGL ES 2.0.
    Unity version: 2019.2.14

    Where do I fing a Bug report??
     
  15. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
  16. xxluky

    xxluky

    Joined:
    Dec 4, 2014
    Posts:
    19
  17. dm_bond

    dm_bond

    Joined:
    Sep 19, 2011
    Posts:
    62
    Case 1258280. Occurs on devices with Mali-400 GPU
    Shader causing error:
    Code (CSharp):
    1. Shader "Test/TestShader"
    2. {
    3.     Properties
    4.     {
    5.         _MainTex ("Background", 2D) = "black" {}
    6.         _TestFloat ("Test Float", float) = 0
    7.     }
    8.     SubShader
    9.     {
    10.         Tags { "RenderType"="Opaque" }
    11.         LOD 100
    12.  
    13.         Pass
    14.         {
    15.             CGPROGRAM
    16.             #pragma target 2.0
    17.             #pragma vertex vert
    18.             #pragma fragment frag
    19.  
    20.             #include "UnityCG.cginc"
    21.  
    22.             struct appdata
    23.             {
    24.                 float4 vertex : POSITION;
    25.                 half2 uv : TEXCOORD0;
    26.             };
    27.  
    28.             struct v2f
    29.             {
    30.                 half2 uv : TEXCOORD0;
    31.                 float4 vertex : SV_POSITION;
    32.             };
    33.  
    34.             sampler2D _MainTex;
    35.             float4 _MainTex_ST;
    36.  
    37.             float _TestFloat;
    38.  
    39.             v2f vert (appdata v)
    40.             {
    41.                 v2f o;
    42.                 o.vertex = UnityObjectToClipPos(v.vertex);
    43.                 o.uv = TRANSFORM_TEX(v.uv, _MainTex) + frac(float2(_TestFloat, _TestFloat) * _Time);
    44.                 return o;
    45.             }
    46.  
    47.             fixed4 frag (v2f i) : SV_Target
    48.             {
    49.                 fixed4 col = tex2D(_MainTex, i.uv + float2(_TestFloat, _TestFloat));
    50.                 return col;
    51.             }
    52.             ENDCG
    53.         }
    54.     }
    55. }
    Corrected Shader without error:
    Code (CSharp):
    1. Shader "Test/FixedShader"
    2. {
    3.     Properties
    4.     {
    5.         _MainTex ("Background", 2D) = "black" {}
    6.         _TestFloat ("Test Float", float) = 0
    7.     }
    8.     SubShader
    9.     {
    10.         Tags { "RenderType"="Opaque" }
    11.         LOD 100
    12.  
    13.         Pass
    14.         {
    15.             CGPROGRAM
    16.             #pragma target 2.0
    17.             #pragma vertex vert
    18.             #pragma fragment frag
    19.  
    20.             #include "UnityCG.cginc"
    21.  
    22.             struct appdata
    23.             {
    24.                 float4 vertex : POSITION;
    25.                 half2 uv : TEXCOORD0;
    26.             };
    27.  
    28.             struct v2f
    29.             {
    30.                 half2 uv : TEXCOORD0;
    31.                 float4 vertex : SV_POSITION;
    32.             };
    33.  
    34.             sampler2D _MainTex;
    35.             float4 _MainTex_ST;
    36.  
    37.             float _TestFloat;
    38.  
    39.             v2f vert (appdata v)
    40.             {
    41.                 v2f o;
    42.                 o.vertex = UnityObjectToClipPos(v.vertex);
    43.                 float2 test = float2(_TestFloat, _TestFloat); // fix "GLSL link error: L0010 Uniform '_TestFloat' differ on precision"
    44.                 o.uv = TRANSFORM_TEX(v.uv, _MainTex) + frac(test * _Time);
    45.                 return o;
    46.             }
    47.  
    48.             fixed4 frag (v2f i) : SV_Target
    49.             {
    50.                 fixed4 col = tex2D(_MainTex, i.uv + float2(_TestFloat, _TestFloat));
    51.                 return col;
    52.             }
    53.             ENDCG
    54.         }
    55.     }
    56. }
    Shader doesn't make sense, just to demonstrate an error. I don't think it's anything that should or could fix UT. Just to demonstrate a possible bug fix, since this is the first Google link on the appropriate request.
    There was also a error: "-------- GLSL link error: L0010 Uniform '_WorldSpaceLightPos0' differ on precision" before I cleared the project from the unused shaders and the scene from the Lighting.
    Support response:
     
    Last edited: Jun 25, 2020
    AlbertWong and aleksandrk like this.