Search Unity

Question How to prevent TMPro texts from being affected by post processing?

Discussion in 'High Definition Render Pipeline' started by xeon321, Mar 27, 2020.

  1. xeon321

    xeon321

    Joined:
    Nov 10, 2016
    Posts:
    9
    Hi, I am currently having an issue where the TMPro text is being affected by post processing, it made the text's color looks way off than what it should be. (eg: white color text looks like gray color text).

    Is there any way for me to prevent TMPro text from being affected by post processing?
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    You can do a custom shadergraph shader for you text, set in transparent mode and after post process rendering pass.
     
  3. xeon321

    xeon321

    Joined:
    Nov 10, 2016
    Posts:
    9
    That's the thing though, I don't think TMPro's text shaders are open source? And if I use Unity's Text, it works but it looks really bad when its small.
     
  4. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    765
    I'm not sure if that's your issue with "bad looking text", but for Unity's Text to look better, I used to divide the character size by X and then multiply the font size by X to have a better defined/resolution text.
     
  5. xeon321

    xeon321

    Joined:
    Nov 10, 2016
    Posts:
    9
    I just found TMPro's shader (it's not shader graph compatible obviously) what can I write to prevent it from being affected by post processing? I tried changing the render queue, doesn't work, the text just stops rendering.

    What I am doing at the moment is, set the font size to really high and then scale it down to like 0.1 or something.
    It looks good when the scale is big enough, but the moment the scale is small OR the text is far (world space)
    then the text starts to look like this
    upload_2020-3-27_23-46-12.png
     
    chap-unity likes this.