Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro TexMeshPro Distance filed overlay shader invisible in hdrp

Discussion in 'UGUI & TextMesh Pro' started by wahnishjorge25, May 30, 2019.

  1. wahnishjorge25

    wahnishjorge25

    Joined:
    Jan 24, 2015
    Posts:
    13
  2. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    159
    Has this issue been resolved with 2019.2?
     
  3. InitusInteractive

    InitusInteractive

    Joined:
    Aug 16, 2018
    Posts:
    128
    any update or work around for this yet?
     
  4. wahnishjorge25

    wahnishjorge25

    Joined:
    Jan 24, 2015
    Posts:
    13
    InitusInteractive likes this.
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    HDRP along with Shader Graph editable shaders is coming to TMP. I would expect to have an initial set of shaders available within the next 30 to 60 days.
     
  6. InitusInteractive

    InitusInteractive

    Joined:
    Aug 16, 2018
    Posts:
    128
    For anyone interested. I was able to get TMP working by reimporting/recrrating any font assets I had. After doing this it began to work again.
     
  7. sinjinn

    sinjinn

    Joined:
    Mar 31, 2019
    Posts:
    149
    Wow... 30 to 60 days...it's 17 th now... so ...that's 10 - 40 days. WooHoo!!
     
    InitusInteractive likes this.
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    We are just waiting on the Shader Graph team to give us the ability to define custom material inspectors for Shader Graph shaders.

    Without such ability, we can provide HDRP compatible shaders but they would not be editable in shader graph. Obviously we want them to be editable / tweakable by users.

    We are almost there ;)
     
    InitusInteractive and sinjinn like this.
  9. sinjinn

    sinjinn

    Joined:
    Mar 31, 2019
    Posts:
    149
    Im hyped.
     
  10. einWikinger

    einWikinger

    Joined:
    Jul 30, 2013
    Posts:
    97
    Any updates on this? We're using TMP to render text in the "world", and the original set of shaders do a not-so-good job at it :D
     
  11. sinjinn

    sinjinn

    Joined:
    Mar 31, 2019
    Posts:
    149
    I believe the term NECRO is applied here. Let us do math....
    On 27th Jan it was 30-60 days...
    Edit: Math too hard.
    -13/3 today = 30 + 16 = 46 days

    I guess we're in snap bang in the middle of the decreed time.
    We must wait at the cross roads for those initial set of shaders....1 would be enough.
     
    Last edited: Mar 13, 2020
  12. einWikinger

    einWikinger

    Joined:
    Jul 30, 2013
    Posts:
    97
    In the meantime I'll just go and implement something "working for our case" in SG then... :'D
     
  13. waller_g

    waller_g

    Joined:
    Jan 16, 2017
    Posts:
    12
    Any word on this? Still having issues in June 2020, using 2019.3 and HDRP 7.3.1...
     
  14. wahnishjorge25

    wahnishjorge25

    Joined:
    Jan 24, 2015
    Posts:
    13
    andreyefimov2010 and waller_g like this.
  15. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    Given the long timeline on this, I'm really hoping this doesn't mean this feature won't be available for 2019.4. I've been waiting on this same thing for a little over a year now, and it would be frustrating if this gets pinned to some Shader Graph update that won't be available under 2019.4. Could @Stephan_B confirm this is still slated for 2019.4?
     
  16. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Yes. Will make sure this is available in the 2019.4 cycle.
     
    waller_g, einWikinger and dgoyette like this.
  17. Tricktale

    Tricktale

    Joined:
    Jan 23, 2015
    Posts:
    42
    Any update on the TMP Shader Graph shaders @Stephan_B ?
     
    waller_g, Liderangel and einWikinger like this.
  18. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    101

    Any idea on which one?
     
    waller_g likes this.
  19. waller_g

    waller_g

    Joined:
    Jan 16, 2017
    Posts:
    12
    Is there any update on this? As of 2019.4.15f1 on Dec 8, 2020 there is still no functionality for Distance Field Overlay shaders in HDRP.
     
  20. Ultroman

    Ultroman

    Joined:
    Mar 10, 2014
    Posts:
    110
    This is getting ridiculous. We have never had a reliable way to render text in HDRP as of yet. The regular Text components are just too ugly and unstable. Especially when changing resolution while using a font asset with "Character" set to "Dynamic" (which is default and required for font styles to work, e.g. bold and italic), in which case they scale in weird steps instead of at a constant rate, messing up the design. TMP has none of those issues, but instead renders underneath all other UI (but only in builds; they show up fine in Game View and Scene View, just not in builds).

    Most games have text in them. We need TMP. What is happening at Unity? @Stephan_B
     
    Last edited: Jan 7, 2021
  21. andrescuevas

    andrescuevas

    Joined:
    Apr 23, 2019
    Posts:
    24
    empty text unity.PNG Is this the reason why textmeshpro objects are visible in scene view, but dissappear when instanced in game mode? Im using URP.
     
    Last edited: Jan 8, 2021
  22. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Text objects using the Mobile Distance Field or Full Distance Field shaders should work fine in URP and HDRP. These objects disappearing in game mode appears to be something new. As per my request in the other thread, please submit a bug report on this one.

    With regards to UPR and HDRP support for TMP, this is something I have been working on for which I expect to have a solution soon. I know this is a high priority for an increasing number of users and I really want to have a solution available as soon as possible.

    Here is a screenshot of the latest implementation in Shader Graph 11.0.0. I expect to be able to provide similar graphs for 2019.4 using Shader Graph 7.5.x.

    upload_2021-1-8_15-37-6.png

    The above unlit graph supports 3 Outlines + Underlay. The lit graph will be roughly the same.

    Glow is not available in the above graph as the 3 outline channel can be used as Glow which combined with post processing FX should yield better visual results than the old glow.

    Face and Outline texturing support will require a new version of TMP where UV0 will now be a float4 where X, Y are the UV coordinates of the glyph in the atlas texture. Z the atlas texture index and W the SDF Scale. UV2 will now contain the UV coordinates for the Face and Outline texture. This change is required due to Shader Graph not supporting per vertex operations where unpacking of texture coordinates is handled in the current TMP shaders.

    I also need to revise how material property values like Dilation, Outline Width, Underlay Offset, etc. are defined so these are relative to Sampling Point Size to Padding Ratio.

    I also started working on custom material inspectors which it became clear were required during my testing.

    My current plan is to ship the next release of the TMP package next week which will be version 1.5.4 for Unity 2018.4, version 2.1.4 for Unity 2019.4 and version 3.0.4 for Unity 2020 or newer. This new release includes important bug fixes. Once these have been released, I will be focusing on the next preview release which will include these new graphs, revised UV handling described above and custom material inspectors.
     
    einWikinger and dgoyette like this.
  23. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    I just wanted to double check something, while we're waiting for the new shaders to land. Really the only thing I'm personally missing about TMP in HDRP is the inability to render TMP text in the "After Post-process" rendering pass, as I can with other UI:

    upload_2021-1-20_10-36-16.png

    Looking at the impact of choosing "After post-process" versus "Default" for the rendering pass of other shaders, it seems that simply changes the render queue value from 3000 to 3700.

    If I try editing the TMP SDF shader to contain
    "Queue" = "Transparent+700"
    , however, doesn't render at all. +500 works, but it looks blurry, so I'm guessing that's rendering in the "low resolution" pass. But +700 doesn't render anything.

    Do you know if there's some way the existing shaders can support rendering in the Transparent+700, to apply after post processing? Or is that something only the shader graph approach can support for some reason?
     
  24. AdamSt

    AdamSt

    Joined:
    Jun 2, 2013
    Posts:
    18
    Yeah, still not fixed.
    I found really stupid workaround by using HDRP/Lit as material and changing rendering path to on top of everything.
    But this is partial workaround, as text is really blurry - bot for now it's only one solution.

    Tried reimporting TMP font asset after HDRP properly implemented - not working,
    tried creating new font asset after HDRP implementation - not working,
    tried reimporting whole package of Text Mesh Pro - nothing changed,
    tried creating new font asset after above reimport - guess what? Still not working :D !

    This is really ridiculous...
     
    divakar_unity461 likes this.
  25. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I did release a preview of the TMP SRP shaders in the following post.
     
  26. divakar_unity461

    divakar_unity461

    Joined:
    Mar 7, 2023
    Posts:
    1
    Just tried those out. All still clip with geometry and distance field overlay is still invisible. It is 2023.. how has this not been fixed yet?? smh
     
  27. hugokostic

    hugokostic

    Joined:
    Sep 23, 2017
    Posts:
    81
    Ok I just discover this tread, I have an easy solution for all HDRP users.
    HDRP can override Depth using Custom Pass so everything on a Layer will be written on top of the Rendering if you overwrite the Depth.
    I guess it is even the best approach to do this.

    So the first step is to create a new layer for your UI gameObjects, keep using the normal TextMeshPro distance field shader.
    Add a Custom pass to your scene
    Remove the new layer from the Camera, (the gameObjects using this layer will disappear from Camera rendering)
    Add a Draw Renderer Custom Pass to the Custom Pass, I use the new layer as LayerMask, like in the image below
    So your UI should reappear, but with the same Depth, So we need to modify this parameters.
    Check the Override Depth boolean, and set up the Depth Test to be Always
    Capture d’écran 2023-03-27 181613.png

    So if the Text object is on the your "UI" layer it will always draw like in the gif below
    UI Always visible.gif

    Btw, I guess the Overlay TextMeshPro shader need a update because it an easy fix
     
  28. AppleML

    AppleML

    Joined:
    Jul 16, 2017
    Posts:
    5

    Thank you for this fix. It works perfectly.
     
    iamau5 and hugokostic like this.
  29. BinglingBingus

    BinglingBingus

    Joined:
    Apr 12, 2023
    Posts:
    1
    Changed settings to exact and it works, even with "Your HDRP Settings do not support forwardOnly. Thank you so much this has been killing me for weeks!
     
  30. Eloren

    Eloren

    Joined:
    Jul 17, 2019
    Posts:
    24
    Why does TextMeshPro distance field shader OVERLAY even exist if it does not work?