Search Unity

TextMesh Pro TextMesh Pro is rendered pink on old Graphics card

Discussion in 'UGUI & TextMesh Pro' started by cpfennig, Feb 26, 2019.

  1. cpfennig

    cpfennig

    Joined:
    Apr 10, 2018
    Posts:
    2
    Hello,

    This is my first post on a Unity Forum, so I hope I am doing everything right ;).

    I have an issue regarding running TextMesh Pro on an old graphics card. Running the application on the device causes the text to look like pink blocks. I have to get it running on the hardware changing the graphics card is not an option. Running the application on the CPU in DirectX 11 shows the text, but the performance is really bad so this is not an option either. This problem only occurs on that hardware. Running the Direct X 9 build on my computer with a fairly new graphics card shows the text properly.

    Technical Data:
    Graphics card: IntelGMA 950 --> Supports only DirectX 9 and OpenGL 1.4 or lesser versions (last driver was released 2009)
    Unity Version: 2017.2.4p1 (Project was downgraded from 2017.4.20f2 to support Direct X 9)
    TextMesh Pro Version: 1.0.54 released in December 2016
    DirectX 9 is used for the build.

    What I have tried so far:
    - Building the Project in OpenGL --> Is not running on the machine
    - Reimporting the shaders
    - Rebuilding the Font Assets
    - Changing the shader type of the fonts (Everything was left pink, Bitmap was not rendered at all, no difference between mobile and not mobile shaders)

    The graphics card is probably not able to render the shaders properly. Has anyone experienced something similiar or has an idea how to solve this problem? Would changing to an older TextMesh Pro version work? Can I somehow downgrade the shaders to make them work on old hardware like this?

    Edit: Solved the problem, by setting the target version of the TextMeshPro Shaders to 2.0


    Unbenannt.png
     
    Last edited: Feb 26, 2019
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The GPU you are referencing most likely only supports Shader model 2.0. As such you will have to use the Mobile Distance Field Shader which should be fine on 2.0 hardware.

    The other TMP shaders have higher requirements but could be edited to reduce some functionality to make them work under model 2.0.
     
    cpfennig likes this.
  3. cpfennig

    cpfennig

    Joined:
    Apr 10, 2018
    Posts:
    2
    Yes we used the Mobile Distance Field shader and added
    #pragma target 2.0 to reduce it to Shader model 2.0 ;). That solved the problem.
     
    mohanki, SarahMSG and Stephan_B like this.
  4. paatz04

    paatz04

    Joined:
    Aug 1, 2013
    Posts:
    38
    Does TMPro have issues with OpenGL Core on Mac standalone builds ? Some of the text in our game is rendered using weird wrong colors, as if some texture or movie was on - top.

    It only happens when using overlay camera rendering mode on canvas and opengl core on mac

     
    Last edited: Jul 10, 2019
  5. ahmedibrahim21

    ahmedibrahim21

    Joined:
    Jul 7, 2020
    Posts:
    1
    I was having the same issue when I imported my old package.
    The issue was resolved when I imported TMP essentials resources.
    Windows -> Textmesh Pro -> Import TMP essential resources.
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The TMP Essential Resources include the shaders. Without these shaders missing, the text would render as pink rectangles which indicates a shader error or a missing shader.
     
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Why is
    TMP_SDF-Mobile.shader
    targeting shader model 3.5 instead of 2.0 in that case? I have a few Android players that report pink texts in my game and was surprised to find that TMP targets SM 3.5, even though lowering it to 3.0 still compiles and looks fine according to my limited tests.