Search Issue Tracker

Feature Request

Votes

1

Found in

2021.3.46f1

2022.3.52f1

6000.0.29f1

6000.1.0a7

Issue ID

UUM-90289

Regression

No

Gradient Color is not adjusted when alpha value of the last pin is 0

-

Reproduction steps:
1. Open the attached “UGUISample.zip” project
2. Open the “Assets/Scenes/SampleScene.unity” Scene
3. Select the “LineRenderer-LastAlpha” GameObject in the Hierarchy window
4. Observe the Scene view

Expected result: “LineRenderer-LastAlpha” GameObject is visible in the scene
Actual result: “LineRenderer-LastAlpha” GameObject is not visible in the scene

Reproducible with: 2021.3.46f1, 2022.3.52f1, 6000.0.29f1, 6000.1.0a7

Reproducible on: Windows 11
Not reproducible on: No other environment tested

  1. Resolution Note:

    In the Line Renderer, the provided gradient is sampled at every vertex. In this example, the line consists of only two positions; therefore, the color information is sampled at only two points—the beginning and the end of the gradient—both of which have an alpha value of zero. As a result, any rendered pixels between these two positions will also have a zero alpha value.

    There are two ways to address this issue:
    - Ensure that the LineRenderer is sufficiently tessellated.
    - Use a custom shader to sample a baked gradient at the pixel level instead of relying on vertex colors.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.