diff --git a/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneBreakNote.cs b/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneBreakNote.cs index b0d998270..fc8b672fa 100644 --- a/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneBreakNote.cs +++ b/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneBreakNote.cs @@ -17,6 +17,7 @@ public partial class TestSceneBreakNote : OsuTestScene private readonly Container content; protected override Container Content => content; + protected override Ruleset CreateRuleset() => new SentakkiRuleset(); private int depthIndex; public TestSceneBreakNote() diff --git a/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneHoldNote.cs b/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneHoldNote.cs index e9398b520..668c60aef 100644 --- a/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneHoldNote.cs +++ b/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneHoldNote.cs @@ -15,6 +15,7 @@ public partial class TestSceneHoldNote : OsuTestScene { private readonly Container content; protected override Container Content => content; + protected override Ruleset CreateRuleset() => new SentakkiRuleset(); private int depthIndex; diff --git a/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneTapNote.cs b/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneTapNote.cs index 98dd9f484..d53a34abf 100644 --- a/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneTapNote.cs +++ b/osu.Game.Rulesets.Sentakki.Tests/Objects/TestSceneTapNote.cs @@ -16,6 +16,8 @@ public partial class TestSceneTapNote : OsuTestScene private readonly Container content; protected override Container Content => content; + protected override Ruleset CreateRuleset() => new SentakkiRuleset(); + private int depthIndex; public TestSceneTapNote() diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/DotPiece.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/DotPiece.cs index e4c780a33..5db37c95d 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/DotPiece.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/DotPiece.cs @@ -10,20 +10,20 @@ namespace osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces { public partial class DotPiece : CompositeDrawable { - public DotPiece(float outlineThickness = 2, bool squared = false) - : this(new Vector2(SentakkiPlayfield.DOTSIZE), outlineThickness, squared) + public DotPiece(float outlineThickness = 2) + : this(new Vector2(SentakkiPlayfield.DOTSIZE), outlineThickness) { } - public DotPiece(Vector2 size, float outlineThickness = 2, bool squared = false) + public DotPiece(Vector2 size, float outlineThickness = 2) { Size = size; Vector2 innerDotSize = size - new Vector2(outlineThickness * 2); Anchor = Anchor.Centre; Origin = Anchor.Centre; Masking = true; - CornerExponent = squared ? 2.5f : 2f; - CornerRadius = Math.Min(size.X, size.Y) / (squared ? 4 : 2); + CornerExponent = 2f; + CornerRadius = Math.Min(size.X, size.Y) / 2; InternalChildren = new Drawable[] { new Box @@ -33,8 +33,8 @@ public DotPiece(Vector2 size, float outlineThickness = 2, bool squared = false) }, new Container { - CornerExponent = squared ? 2.5f : 2f, - CornerRadius = Math.Min(innerDotSize.X, innerDotSize.Y) / (squared ? 4 : 2), + CornerExponent = 2f, + CornerRadius = Math.Min(innerDotSize.X, innerDotSize.Y) / 2, Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = innerDotSize, diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/HoldBody.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/HoldBody.cs index 93d76ac0c..747f4cf95 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/HoldBody.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/HoldBody.cs @@ -22,17 +22,12 @@ public HoldBody() Origin = Anchor.TopCentre; InternalChildren = new Drawable[] { - new NoteRingPiece(), - new DotPiece(squared: true) - { - Rotation = 45, - Anchor = Anchor.BottomCentre, - }, - new DotPiece(squared: true) - { - Rotation = 45, - Anchor = Anchor.TopCentre, - }, + new Container{ + RelativeSizeAxes = Axes.Both, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Child = new NoteRingPiece(true) + } }; } diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/LaneNoteVisual.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/LaneNoteVisual.cs new file mode 100644 index 000000000..ed2676f33 --- /dev/null +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/LaneNoteVisual.cs @@ -0,0 +1,157 @@ +using System.Runtime.InteropServices; +using osu.Framework.Allocation; +using osu.Framework.Bindables; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Rendering; +using osu.Framework.Graphics.Shaders; +using osu.Framework.Graphics.Shaders.Types; +using osu.Framework.Graphics.Sprites; +using osu.Game.Rulesets.Objects.Drawables; +using osuTK; + +namespace osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces; + +public enum NoteShape +{ + Ring, + Hex, + Star +} + +public partial class LaneNoteVisual : Sprite, ITexturedShaderDrawable +{ + public NoteShape Shape { get; init; } = NoteShape.Ring; + private float thickness = 0.25f; + public float Thickness + { + get => thickness; + set + { + if (thickness == value) + return; + thickness = value; + Invalidate(Invalidation.DrawNode); + } + } + + private float shadowRadius = 15f / 105f; + public float ShadowRadius + { + get => shadowRadius; + set + { + if (shadowRadius == value) + return; + shadowRadius = value; + Invalidate(Invalidation.DrawNode); + } + } + + private bool glow; + public bool Glow + { + get => glow; + set + { + if (glow == value) + return; + glow = value; + Invalidate(Invalidation.DrawNode); + } + } + + public new IShader TextureShader { get; private set; } = null!; + + protected override DrawNode CreateDrawNode() => new LaneNoteVisualDrawNode(this); + + private BindableBool exBindable = new BindableBool(); + + private string fragmentShaderFor(NoteShape shape) + { + switch (shape) + { + case NoteShape.Ring: + default: + return "ringNote"; + case NoteShape.Hex: + return "hexNote"; + case NoteShape.Star: + return "starNote"; + } + } + + [BackgroundDependencyLoader] + private void load(ShaderManager shaders, IRenderer renderer, DrawableHitObject? hitObject) + { + TextureShader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, fragmentShaderFor(Shape)); + Texture = renderer.WhitePixel; + + if (hitObject is null) + return; + + // Bind exnote + exBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExBindable); + exBindable.BindValueChanged(b => Glow = b.NewValue, true); + } + + private partial class LaneNoteVisualDrawNode : SpriteDrawNode + { + protected new LaneNoteVisual Source => (LaneNoteVisual)base.Source; + protected override bool CanDrawOpaqueInterior => false; + private IUniformBuffer? shapeParameters; + + private float thickness; + private Vector2 size; + private bool glow; + private float shadowRadius; + + public LaneNoteVisualDrawNode(LaneNoteVisual source) + : base(source) + { + } + + public override void ApplyState() + { + base.ApplyState(); + thickness = Source.Thickness; + size = Source.DrawSize; + shadowRadius = Source.shadowRadius; + glow = Source.Glow; + } + + protected override void BindUniformResources(IShader shader, IRenderer renderer) + { + base.BindUniformResources(shader, renderer); + + shapeParameters ??= renderer.CreateUniformBuffer(); + + shapeParameters.Data = shapeParameters.Data with + { + Thickness = thickness, + Size = size, + ShadowRadius = shadowRadius, + Glow = glow, + }; + + shader.BindUniformBlock("m_shapeParameters", shapeParameters); + } + + protected override void Dispose(bool isDisposing) + { + base.Dispose(isDisposing); + shapeParameters?.Dispose(); + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + private record struct ShapeParameters + { + public UniformFloat Thickness; + public UniformPadding4 _; + public UniformVector2 Size; + public UniformFloat ShadowRadius; + public UniformBool Glow; + + public UniformPadding8 __; + } + } +} diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs index 9cbe80fb1..ac88c07fe 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs @@ -9,17 +9,22 @@ namespace osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces public partial class NoteRingPiece : CompositeDrawable { private const float base_circle_size = 75; + private const float drawable_size = base_circle_size + 30; // 30 units for shadow - public NoteRingPiece() + public NoteRingPiece(bool hex = false) { - Padding = new MarginPadding(-base_circle_size / 2); + Padding = new MarginPadding(-drawable_size / 2); RelativeSizeAxes = Axes.Both; Anchor = Anchor.Centre; Origin = Anchor.Centre; InternalChildren = new Drawable[] { - new ShadowPiece(), - new RingPiece(), + new LaneNoteVisual(){ + RelativeSizeAxes = Axes.Both, + Shape = hex ? NoteShape.Hex : NoteShape.Ring, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + } }; } } diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/ShadowPiece.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/ShadowPiece.cs deleted file mode 100644 index 74d227050..000000000 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/ShadowPiece.cs +++ /dev/null @@ -1,67 +0,0 @@ -using osu.Framework.Allocation; -using osu.Framework.Bindables; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Effects; -using osu.Game.Rulesets.Objects.Drawables; -using osuTK.Graphics; - -namespace osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces -{ - public partial class ShadowPiece : Container - { - private CircularContainer glowContainer; - - private Bindable ExBindable = new Bindable(true); - private Bindable AccentColour = new Bindable(); - - private static readonly EdgeEffectParameters shadow_parameters = new EdgeEffectParameters - { - Type = EdgeEffectType.Shadow, - Radius = 15, - Colour = Color4.Black, - Hollow = true - }; - - public ShadowPiece() - { - RelativeSizeAxes = Axes.Both; - Anchor = Anchor.Centre; - Origin = Anchor.Centre; - Padding = new MarginPadding(1); - - Child = glowContainer = new CircularContainer - { - Alpha = .5f, - Masking = true, - RelativeSizeAxes = Axes.Both, - EdgeEffect = shadow_parameters - }; - } - - [BackgroundDependencyLoader] - private void load(DrawableHitObject hitObject) - { - // Bind exnote - ExBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExBindable); - AccentColour.BindTo(hitObject.AccentColour); - - AccentColour.BindValueChanged(_ => updateGlow()); - ExBindable.BindValueChanged(_ => updateGlow(), true); - } - - private void updateGlow() - { - if (!ExBindable.Value) - { - glowContainer.EdgeEffect = shadow_parameters; - return; - } - - glowContainer.EdgeEffect = shadow_parameters with - { - Colour = AccentColour.Value - }; - } - } -} diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/Slides/StarPiece.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/Slides/StarPiece.cs index ffee0e2c2..f85f88526 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/Slides/StarPiece.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/Slides/StarPiece.cs @@ -1,51 +1,32 @@ using osu.Framework.Allocation; -using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Textures; -using osu.Game.Rulesets.Objects.Drawables; -using osuTK.Graphics; namespace osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces.Slides { public partial class StarPiece : CompositeDrawable { - private Sprite glowTexture = null!; - - private Bindable ExBindable = new Bindable(); - + private const float base_circle_size = 75; + private const float drawable_size = base_circle_size + 30; // 30 units for shadow public StarPiece() { Anchor = Anchor.Centre; Origin = Anchor.Centre; + Padding = new MarginPadding(-drawable_size / 2); } [BackgroundDependencyLoader] - private void load(TextureStore textures, DrawableHitObject? hitObject) + private void load() { AddRangeInternal(new Drawable[]{ - glowTexture = new Sprite - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Texture = textures.Get("starGlow"), - Colour = Color4.Black - }, - new Sprite - { + new LaneNoteVisual{ + RelativeSizeAxes = Axes.Both, + + Shape = NoteShape.Star, Anchor = Anchor.Centre, Origin = Anchor.Centre, - Texture = textures.Get("star"), } }); - - if (hitObject is null) - return; - - // Bind exnote - ExBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExBindable); - ExBindable.BindValueChanged(v => glowTexture.Colour = v.NewValue ? Color4.White : Color4.Black, true); } } } diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/TapPiece.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/TapPiece.cs index 3bf6da55b..f89a9e7d1 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/TapPiece.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/TapPiece.cs @@ -22,8 +22,7 @@ public TapPiece() Position = new Vector2(0, -SentakkiPlayfield.NOTESTARTDISTANCE); InternalChildren = new Drawable[] { - new NoteRingPiece(), - new DotPiece(), + new NoteRingPiece() }; } diff --git a/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_hexNote.fs b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_hexNote.fs new file mode 100644 index 000000000..99b674ac8 --- /dev/null +++ b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_hexNote.fs @@ -0,0 +1,95 @@ +#ifndef SENTAKKI_HEX_NOTE_FS +#define SENTAKKI_HEX_NOTE_FS + +#include "sh_noteBase.fs" + +// SDF that makes a rounded hexagon +// Adapted from the Star shader provided at https://iquilezles.org/articles/distfunctions2d/ +float roundedHexSDF(in vec2 p, in vec2 origin, in float h, in float r) +{ + vec2 P = p - origin; + const float n = 6.0; // 6 sided star + const float w = 1.0; // With no angle + + // these 5 lines can be precomputed for a given shape + //float m = n*(1.0-w) + w*2.0; + const float m = n + w * (2.0 - n); + + const float an = 3.1415927 / n; + const float en = 3.1415927 / m; + const vec2 ecs = vec2(cos(en),sin(en)); // ecs=vec2(0,1) and simplify, for regular polygon, + + vec2 racs = r * vec2(cos(an),sin(an)); + + float halfHeight = h * 0.5; + float absY = abs(P.y); + + if(absY <= halfHeight){ + return abs(P.x) - racs.x; + } + + P = vec2(abs(P.x), (absY - halfHeight)); + + // reduce to first sector + float bn = mod(atan(P.x,P.y), 2.0 * an) - an; + P = length(P) * vec2(cos(bn), abs(sin(bn))); + + // line sdf + P -= racs; + P += ecs * clamp(-dot(P,ecs), 0.0, racs.y / ecs.y); + return length(P) * sign(P.x); +} + +// A simple hex SDF, adapted from https://andrewhungblog.wordpress.com/2018/07/28/shader-art-tutorial-hexagonal-grids/ +// Supports arbitrary heights, while maintaining identical radius +// This one doesn't support rounded corners +float hexSDF(in vec2 p, in vec2 origin, in float h, in float r) +{ + vec2 P = p - origin; + + if(abs(P.y) < h/2.0){ + return abs(P.x) - r; + } + + float hexSize = r; + const vec2 s = vec2(1, 1.7320508); + + float newY = (abs(P.y) - h/2.0); + p = vec2(P.x, newY); + + p = abs(p); + + return max(dot(p, s*.5), p.x) - hexSize; +} + +void main(void) { + vec2 resolution = v_TexRect.zw - v_TexRect.xy; + vec2 pixelPos = (v_TexCoord - v_TexRect.xy) / resolution; + + vec2 p = pixelPos * size; + vec2 c = 0.5 * size; + + float shadeRadius = size.x * shadowRadius; + float noteW = size.x - shadeRadius * 2; + float borderThickness = thickness * 0.5 * noteW; + float paddingAmount = - borderThickness - shadeRadius; + + float radius = size.x * 0.5 + paddingAmount; + + float h = size.y - size.x; + + float hex = roundedHexSDF(p, c, h, radius); + float dotDown = circleSDF(p, c + vec2(0, h * 0.5), borderThickness/4 - 1.5 ); + float dotUp = circleSDF(p, c -vec2(0, h * 0.5), borderThickness/4 - 1.5); + + vec4 dotDownShape = sdfToShape(dotDown, borderThickness, 0); + vec4 dotUpShape = sdfToShape(dotUp, borderThickness, 0); + + vec4 r2 = max(dotDownShape - dotUpShape, vec4(0,0,0,0)) + dotUpShape; + + vec4 r = sdfToShape(hex, borderThickness, shadeRadius) + r2; + + o_Colour = r; +} + +#endif \ No newline at end of file diff --git a/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_noteBase.fs b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_noteBase.fs new file mode 100644 index 000000000..8ede10aa9 --- /dev/null +++ b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_noteBase.fs @@ -0,0 +1,49 @@ +#ifndef SENTAKKI_NOTE_BASE_FS +#define SENTAKKI_NOTE_BASE_FS + +#include "sh_Utils.h" + +layout(location = 1) in lowp vec4 v_Colour; +layout(location = 2) in highp vec2 v_TexCoord; +layout(location = 3) in highp vec4 v_TexRect; + +layout(location = 0) out vec4 o_Colour; + +layout(std140, set = 0, binding = 0) uniform m_shapeParameters +{ + float thickness; + vec2 size; + float shadowRadius; + bool glow; +}; + +vec4 sdfToShape(in float dist, in float borderThickness, in float shadowThickness){ + vec3 shadowColor = glow ? vec3(1) : vec3(0); + float shadowAlpha = glow ? 0.75: 0.6; + + float base = smoothstep(borderThickness - 2.0, borderThickness - 3.0, abs(dist)); + float outline = smoothstep(borderThickness, borderThickness - 1.0, abs(dist)); + + if(shadowThickness < 1) + return vec4(vec3(max(outline * 0.5, base)), outline) * v_Colour; + + float shadowDist = dist - borderThickness; + + float shadow = pow((1 - clamp(((1 / shadowThickness) * shadowDist), 0.0 , 1.0)) * shadowAlpha, 2.0); + float exclusion = smoothstep(borderThickness, borderThickness - 1.0, dist); // Inner cutout for shadow + + float innerShading = smoothstep(borderThickness -2.0, 0.0 , abs(dist)); + + vec4 shadowPart = vec4(shadowColor,shadow) * (1 - exclusion) * v_Colour; + vec4 fillPart = vec4(vec3(max(outline * 0.5, base)), outline) * v_Colour; + + //vec4 stylizedFill = mix(fillPart, v_Colour * 0.85, innerShading); + + return shadowPart + fillPart; +} + +float circleSDF(in vec2 p, in vec2 centre, in float radius){ + return length(p - centre) - radius; +} + +#endif \ No newline at end of file diff --git a/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_ringNote.fs b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_ringNote.fs new file mode 100644 index 000000000..3b6a5203e --- /dev/null +++ b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_ringNote.fs @@ -0,0 +1,27 @@ +#ifndef SENTAKKI_RING_FS +#define SENTAKKI_RING_FS + +#include "sh_noteBase.fs" + +void main(void) { + vec2 resolution = v_TexRect.zw - v_TexRect.xy; + vec2 pixelPos = (v_TexCoord - v_TexRect.xy) / resolution; + + vec2 p = pixelPos * size; + vec2 c = 0.5 * size; + + float shadeRadius = size.x * shadowRadius; + float noteW = size.x - shadeRadius * 2; + float borderThickness = thickness * 0.5 * noteW; + float paddingAmount = - borderThickness - shadeRadius; + + float radius = size.x * 0.5 + paddingAmount; + + float dotSDF = circleSDF(p,c, borderThickness / 4 - 1.5); + float ringSDF = circleSDF(p, c, radius); + + vec4 r = sdfToShape(ringSDF, borderThickness, shadeRadius) + sdfToShape(dotSDF, borderThickness, 0); + o_Colour = r; +} + +#endif \ No newline at end of file diff --git a/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_starNote.fs b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_starNote.fs new file mode 100644 index 000000000..b5377dc25 --- /dev/null +++ b/osu.Game.Rulesets.Sentakki/Resources/Shaders/sh_starNote.fs @@ -0,0 +1,57 @@ +#ifndef SENTAKKI_STAR_NOTE_FS +#define SENTAKKI_STAR_NOTE_FS + +#include "sh_noteBase.fs" + +// signed distance to a n-star polygon, with external angle w +float sdStar(in vec2 p, in vec2 origin, in float r, in float n, in float w) +{ + vec2 P = p-origin; + P.y = -P.y; + // these 5 lines can be precomputed for a given shape + //float m = n*(1.0-w) + w*2.0; + float m = n + w*(2.0-n); + + float an = 3.1415927/n; + float en = 3.1415927/m; + vec2 racs = r*vec2(cos(an),sin(an)); + vec2 ecs = vec2(cos(en),sin(en)); // ecs=vec2(0,1) and simplify, for regular polygon, + + // symmetry (optional) + P.x = abs(P.x); + + // reduce to first sector + float bn = mod(atan(P.x,P.y),2.0*an) - an; + P = length(P)*vec2(cos(bn),abs(sin(bn))); + + // line sdf + P -= racs; + P += ecs*clamp( -dot(P,ecs), 0.0, racs.y/ecs.y); + return length(P)*sign(P.x); +} + + +void main(void) { + vec2 resolution = v_TexRect.zw - v_TexRect.xy; + vec2 pixelPos = (v_TexCoord - v_TexRect.xy) / resolution; + + vec2 p = pixelPos * size; + vec2 c = 0.5 * size; + + float shadeRadius = size.x * shadowRadius; + float noteW = size.x - shadeRadius * 2; + float borderThickness = thickness * 0.5 * noteW; + float paddingAmount = - borderThickness - shadeRadius; + + float radius = size.x * 0.5 + paddingAmount; + + float h = size.y - size.x; + + float star = sdStar(p, c, radius, 5, 0.6); + + vec4 r = sdfToShape(star, borderThickness * 0.75, shadeRadius); + + o_Colour = r; +} + +#endif \ No newline at end of file diff --git a/osu.Game.Rulesets.Sentakki/Resources/Textures/star.png b/osu.Game.Rulesets.Sentakki/Resources/Textures/star.png deleted file mode 100644 index 7f2d0d5a7..000000000 Binary files a/osu.Game.Rulesets.Sentakki/Resources/Textures/star.png and /dev/null differ diff --git a/osu.Game.Rulesets.Sentakki/Resources/Textures/starGlow.png b/osu.Game.Rulesets.Sentakki/Resources/Textures/starGlow.png deleted file mode 100644 index ae46115b9..000000000 Binary files a/osu.Game.Rulesets.Sentakki/Resources/Textures/starGlow.png and /dev/null differ