Search Unity

TextMesh Pro font invisible on transparent mesh

Discussion in 'UGUI & TextMesh Pro' started by habitoti, Feb 18, 2019.

  1. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Hi,

    I am having trouble showing a TextMesh Pro text on top of a transparent mesh. It‘s a 2D setup, and the text is definitely hovering on top of that mesh. Choosing some different shader will display it, however it looks awful then. None of the TextMesh shaders does show it though.
    I am by far no shader expert, so does anyone know how I would have to modify one of the TextMesh Pro shaders to make text appear properly om top of a transparent mesh?

    Thanks, habitoti
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This behavior is related to sorting of Transparent objects which is not specific to TextMesh Pro. See the following Answer which explains all of this along with potential solutions.
     
  3. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Ok, so forcing a custom render queue of 1 (rather than default -1) on the transparent mesh material does the trick (Not sure yet what undesired side effects this could have, though). I wonder whether it would be also possible to rather have a shader applied to the text material that forces it to render on top of the transparency?