Search Unity

TextMesh Pro Changing TMPro texture to additive...

Discussion in 'UGUI & TextMesh Pro' started by petey, Oct 31, 2017.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Hi there,
    Just wondering, is there a way to change this texture to additive? (or maybe even some other blend modes)

    Thanks!
    Pete
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There is not at this time. This would have to be handled by modifying the shaders.
     
  3. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Thanks Stephan, no worries. Out of interest what part of the shader code would I be loooking at? I have limited shader experience but I might try and have a poke around to se if I can get it happening.
     
  4. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Look for Blend SrcAlpha OneMinusSrcAlpha
    Change to Blend One One


    Ref: https://docs.unity3d.com/Manual/SL-Blend.html
     
    IgorAherneBusiness likes this.
  6. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Sorry I was responding to the OP, not you. If you have a different query, you should totally make a thread for it.
     
  8. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Hi guys,
    I’ve gone down the path of editing the shader. They can be a bit scary but I got there, and even made a few extra tweaks!
    Thanks,
    Pete
     
    ina likes this.
  9. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    138
    care to share the additive material for text? I'm really surprised this isn't a built-in option. Additive text looks awesome on HUDs.
     
  10. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Hey @dark_tonic, do you want the whole shader to be additive? If so, do this -
    It gets a bit tricky because there are a bunch of different shaders you could be using, so it might be better if you mod it yourself.