diff --git a/osu.Framework.Font/Graphics/Shaders/InternalShader.cs b/osu.Framework.Font/Graphics/Shaders/InternalShader.cs new file mode 100644 index 0000000..bfd6306 --- /dev/null +++ b/osu.Framework.Font/Graphics/Shaders/InternalShader.cs @@ -0,0 +1,15 @@ +// Copyright (c) andy840119 . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace osu.Framework.Graphics.Shaders +{ + public abstract class InternalShader : CustomizedShader + { + public abstract string ShaderName { get; } + + protected InternalShader(IShader originShader) + : base(originShader) + { + } + } +} diff --git a/osu.Framework.Font/Graphics/Shaders/OutlineShader.cs b/osu.Framework.Font/Graphics/Shaders/OutlineShader.cs index 893fa2b..6154c6d 100644 --- a/osu.Framework.Font/Graphics/Shaders/OutlineShader.cs +++ b/osu.Framework.Font/Graphics/Shaders/OutlineShader.cs @@ -7,9 +7,10 @@ namespace osu.Framework.Graphics.Shaders { - public class OutlineShader : CustomizedShader + public class OutlineShader : InternalShader { - public const string SHADER_NAME = "Outline"; + public override string ShaderName => "Outline"; + public int Radius { get; set; } public Color4 OutlineColour { get; set; } diff --git a/osu.Framework.Font/Graphics/Shaders/PixelShader.cs b/osu.Framework.Font/Graphics/Shaders/PixelShader.cs index f82a0d3..56ee452 100644 --- a/osu.Framework.Font/Graphics/Shaders/PixelShader.cs +++ b/osu.Framework.Font/Graphics/Shaders/PixelShader.cs @@ -6,9 +6,9 @@ namespace osu.Framework.Graphics.Shaders { - public class PixelShader : CustomizedShader + public class PixelShader : InternalShader { - public const string SHADER_NAME = "Pixel"; + public override string ShaderName => "Pixel"; public Vector2 Size { get; set; } = new Vector2(5); diff --git a/osu.Framework.Font/Graphics/Shaders/RainbowShader.cs b/osu.Framework.Font/Graphics/Shaders/RainbowShader.cs index 3dedc1b..e0a5b85 100644 --- a/osu.Framework.Font/Graphics/Shaders/RainbowShader.cs +++ b/osu.Framework.Font/Graphics/Shaders/RainbowShader.cs @@ -6,9 +6,9 @@ namespace osu.Framework.Graphics.Shaders { - public class RainbowShader : CustomizedShader, IApplicableToCurrentTime + public class RainbowShader : InternalShader, IApplicableToCurrentTime { - public const string SHADER_NAME = "Rainbow"; + public override string ShaderName => "Rainbow"; public Vector2 Uv { get; set; } = new Vector2(0, 1); diff --git a/osu.Framework.Font/Graphics/Shaders/ShadowShader.cs b/osu.Framework.Font/Graphics/Shaders/ShadowShader.cs index 975b582..1f7370f 100644 --- a/osu.Framework.Font/Graphics/Shaders/ShadowShader.cs +++ b/osu.Framework.Font/Graphics/Shaders/ShadowShader.cs @@ -7,9 +7,9 @@ namespace osu.Framework.Graphics.Shaders { - public class ShadowShader : CustomizedShader + public class ShadowShader : InternalShader { - public const string SHADER_NAME = "Shadow"; + public override string ShaderName => "Shadow"; public Color4 ShadowColour { get; set; }