Search Unity

Glow do not support black

Discussion in 'UGUI & TextMesh Pro' started by kvfreedom, Feb 26, 2020.

  1. kvfreedom

    kvfreedom

    Joined:
    Mar 30, 2015
    Posts:
    37
    QQ浏览器截图20200226184144.png
    No effect when the glow color is black.
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Glow is rendered additively, which means you take the current pixel color and add the glow color to get the final result. The value of the color black is (r0, g0, b0), which means you are adding nothing.


    I think you can get an effect similar to a "black glow" if you set your outline color to black, give it just a little thickness, then apply some softness to the Face.

    If you are already using an outline you don't want to remove, you could render 2 copies of the same text where the front one has the settings you like (minus the glow), and the back one is rendered with high softness. If you do this, you can adjust the glow size by adjusting the dilation of the Face.
     
    OlivaDevelop likes this.
  3. kvfreedom

    kvfreedom

    Joined:
    Mar 30, 2015
    Posts:
    37
    Outline doesn't work well with thick borders. It has only one Thickness to control.
    QQ浏览器截图20200302103626.png
    QQ浏览器截图20200302104454.png
    QQ浏览器截图20200302104553.png
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Outline is applied at the edge of the glyph and spreads evenly inward and outward. By using Dilation, you can control / shift the outline to the outside or inside.

    For example an Outline of 0.1 with Dilation of 0.1 will result in the Outline applied on the outside of the glyph. By contrast, a Dilation of -0.1 will have the Outline applied on the inside.

    The ratio of Sampling Point Size to Padding controls the effective range of material properties. This is how you control the range of Dilation, Outline, Underlay, etc.
     
  5. kvfreedom

    kvfreedom

    Joined:
    Mar 30, 2015
    Posts:
    37
    I ignored this property under Face. The problem is solved. Thank you!