diff --git a/osu.Framework.Font/Graphics/Sprites/LyricSpriteText.cs b/osu.Framework.Font/Graphics/Sprites/LyricSpriteText.cs index 9026712..a0b5ac0 100644 --- a/osu.Framework.Font/Graphics/Sprites/LyricSpriteText.cs +++ b/osu.Framework.Font/Graphics/Sprites/LyricSpriteText.cs @@ -113,7 +113,7 @@ public IReadOnlyList Shaders if (value != null) shaders.AddRange(value); - Invalidate(Invalidation.DrawNode); + Invalidate(); } } diff --git a/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_DrawNode.cs b/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_DrawNode.cs index 1d69013..d57a8d9 100644 --- a/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_DrawNode.cs +++ b/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_DrawNode.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; -using osu.Framework.Graphics.Extensions; +using System.Linq; using osu.Framework.Graphics.OpenGL.Vertices; using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Shaders; @@ -17,8 +17,12 @@ public partial class LyricSpriteText protected override Quad ComputeScreenSpaceDrawQuad() { // make draw size become bigger (for not masking the shader). - var newRectangle = DrawRectangle.Scale(2); - return ToScreenSpace(newRectangle); + var quad = ToScreenSpace(DrawRectangle); + var drawRectangele = Shaders.OfType() + .Select(x => x.ComputeScreenSpaceDrawQuad(quad).AABBFloat) + .Aggregate(quad.AABBFloat, RectangleF.Union); + + return Quad.FromRectangle(drawRectangele); } protected override DrawNode CreateDrawNode()