Search Issue Tracker

Feature Request

Votes

1

Found in [Package]

3.2.0-pre.4

Issue ID

TMPB-211

Regression

No

[TextMeshPro] Soft mask does not affect text when changing Softness

Package: TextMeshPro

-

Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. In the Hierarchy window under Canvas > Scroll View select Viewport GameObject
5. In the Inspector window, under Rect Mask 2D change the Softness value across the Y axis and observe the Image changing
6. Try using using Scrollbar to move up and down and observe changes

Expected result: Text changes together with the Softness
Actual result: Only the Image GameObject changes Softness but the text stays the same

Reproducible with: 3.2.0-pre.5 (2021.3.30f1)
Could not test with: 4.0.0-pre.2 (2022.3.9f1, 2023.1.13f1), 3.0.0-exp.3 (2023.2.0b9, 2023.3.0a5) (Text is not rendered)

Reproducible on: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested

  1. Resolution Note:

    The uGUI soft-masking feature was not designed to work with TextMeshPro labels. This is a new feature request.

Comments (2)

  1. Ennothan

    Sep 01, 2024 15:44

    Thank you Dust999Games, even though I use the shader SDF mobile version, your changes worked flawlessly.

  2. Dust999Games

    Sep 20, 2023 13:23

    Temp solution fix shader TMP_SDF.shader add soft mask into it

    1) Add two params from soft mask on line 161

    float _UIMaskSoftnessX;
    float _UIMaskSoftnessY;

    Replace line 227 with the next code.

    output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + pixelSize.xy));

    Add soft mask in calculations

Add comment

Log in to post comment