Search Unity

Depth of Field, TextMesh Pro and Transparency rabbit hole

Discussion in 'Image Effects' started by ctronc, Jul 23, 2020.

  1. ctronc

    ctronc

    Joined:
    May 18, 2017
    Posts:
    19
    Hey everyone,

    I'm currently working on a project that requires Depth of Field from the post-processing stack applied to every object on a scene, objects will fly by from behind the camera to the camera view and the objects must look blurry near the camera.

    I noticed that the DOF isn't applied correctly to any TextMeshPro elements, they all blur / unblur at the same rate using DOF controls, regardless of the distance from the camera. The only way to make TextMeshPro objects behave correctly is to change the shader of the font material to Standard and select Cutout as the rendering mode, but this makes the text look really aliased, among other problems.

    I get that this happens because the transparency pass doesn't render depth information. My questions are:
    • Is there an "official" (or any) TextMeshPro shader that works correctly with DOF and supports text antialiasing plus the other niceties of the TextMeshPro default shader?
    • Is there any way at all to have a transparent material that works correctly with DOF?
    I'm on Unity 2019.3.5f1 using the built in render pipeline
     
    Last edited: Jul 24, 2020
  2. ctronc

    ctronc

    Joined:
    May 18, 2017
    Posts:
    19
    Friendly bump :)