Search Unity

Failed Mobile/Distance Field (Surface) Shader on some Devices

Discussion in 'UGUI & TextMesh Pro' started by KepleriansTeam, Mar 14, 2019.

  1. KepleriansTeam

    KepleriansTeam

    Joined:
    Mar 14, 2014
    Posts:
    31
    Hi!

    In my android game, the "mobile distance field (surface)" shader is failing on some devices, and there is some important 3D text as part of the game. We use that shader so that the fog affects it and works correctly.

    Has anyone encountered this problem and been able to solve it?

    Thank you!

    The error in Android Studio:

    Vertex shader compilation failed.
    ERROR: 0:111: ')' : Syntax error: syntax error
    ERROR: 1 compilation errors. No code generated.
    Note: Creation of internal variant of shader 'TextMeshPro/Distance Field (Surface)' failed.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    The Surface Shader has model 3.0 requirements which although nothing new might not be supported on those devices.

    You might be able to edit the shader to remove some of the functionality that you are not using which could allow you to make it Shader model 2.0 compliant.

    Most likely it is the number of variant / parameters being passed to the pixel shader. By removing unused functionality, you would be able to remove those extra parameters.
     
  3. KepleriansTeam

    KepleriansTeam

    Joined:
    Mar 14, 2014
    Posts:
    31
    Thanks Stephan, we will research to make it work by this way and post it here when its working :)