Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions org.mixedrealitytoolkit.uxcore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Unreleased

### Added

* Added `AlphaBlend` tint mode to `TintEffect`. [PR #1131](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1131)

### Fixed

* Fixed "leaked managed shell" issue in `UGUIInputAdapter`. [PR #1096](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1096)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public override void PrepareFrame(Playable playable, FrameData info)
{
ApplyColor(startColors[i], tintables[i]);
}

}

/// <inheritdoc />
Expand Down Expand Up @@ -162,6 +161,12 @@ public override void ProcessFrame(Playable playable, FrameData info, object play
{
targetColor = currentColor * TintColor;
}
else if (BlendMode == BlendType.AlphaBlend)
{
// Simulate layering a transparent color over the current color
targetColor = Color.Lerp(currentColor, TintColor, TintColor.a);
targetColor.a = currentColor.a; // Preserve the graphic's original overall opacity
}
else
{
targetColor = TintColor;
Expand Down Expand Up @@ -191,7 +196,12 @@ internal enum BlendType
/// <summary>
/// Multiply the tint color onto the existing color stack.
/// </summary>
Multiply
Multiply,

/// <summary>
/// Alpha-blends the tint color onto the existing color stack using the tint color's alpha value.
/// </summary>
AlphaBlend
}

[SerializeField]
Expand Down