Skip to content

Update Gradient2.cs - #531

Merged
SimonDarksideJ merged 1 commit into
Unity-UI-Extensions:developmentfrom
hugoymh:Gradient2_vertexcolor_fix
Jul 30, 2026
Merged

Update Gradient2.cs#531
SimonDarksideJ merged 1 commit into
Unity-UI-Extensions:developmentfrom
hugoymh:Gradient2_vertexcolor_fix

Conversation

@hugoymh

@hugoymh hugoymh commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

added _baseVertexColor field to fetch original vertex color from base Graphic

Unity UI Extensions - Pull Request

Overview

fixed Gradient2 color blending in BlendMode.Multiplying

Changes

Added private field Color _baseVertexColor to store vertex color from the base Graphic component (e.g. Image.color).
New vertices instantiated in CreateSplitVertex() now uses this color value instead of Color.white.

(**The implementation assumes the whole mesh from the base Graphic component shares the same vertex color, so it probably won't work well in custom Graphic components which supports gradient colors via modifying vertex colors to different colors)

added _baseVertexColor field to fetch original vertex color from base Graphic
@hugoymh
hugoymh marked this pull request as ready for review July 27, 2026 09:11
@SimonDarksideJ
SimonDarksideJ merged commit df29944 into Unity-UI-Extensions:development Jul 30, 2026
0 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants