Search Unity

TextMesh Pro Trying to make text invisible when not lit by spotlight

Discussion in 'UGUI & TextMesh Pro' started by jmellott, Jun 14, 2019.

  1. jmellott

    jmellott

    Joined:
    May 25, 2013
    Posts:
    1
    Hi all,

    I'm attempting to use TMPro to replicate the effect from Alan Wake where messages are invisible unless their surface is illuminated by the character's flashlight.

    In Unity 2019.1 using Mesh Renderer and the TMPro Distance Field (Surface) shader, I can illuminate the text using a Spotlight, but when unlit the text appears as black instead of transparent. Is this effect possible with any of the shaders provided by Unity?

    There are several videos/posts on how to make similar shaders, but so far none have worked for me "out of the box" and shader math makes my brain bleed. =/

    First post on here after 6 years of Unity. Please be gentle =)

    Untitled.gif
     
    cortexa likes this.
  2. madeinamericamedia

    madeinamericamedia

    Joined:
    Mar 28, 2020
    Posts:
    2