Skip to content

Commit

Permalink
add internal shader class.
Browse files Browse the repository at this point in the history
all shaders in this package should inherit this class.
  • Loading branch information
andy840119 committed Oct 23, 2021
1 parent 17f5950 commit a1b2055
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
15 changes: 15 additions & 0 deletions osu.Framework.Font/Graphics/Shaders/InternalShader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) andy840119 <[email protected]>. 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)
{
}
}
}
5 changes: 3 additions & 2 deletions osu.Framework.Font/Graphics/Shaders/OutlineShader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions osu.Framework.Font/Graphics/Shaders/PixelShader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions osu.Framework.Font/Graphics/Shaders/RainbowShader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions osu.Framework.Font/Graphics/Shaders/ShadowShader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down

0 comments on commit a1b2055

Please sign in to comment.