Skip to content

Commit

Permalink
Merge pull request #226 from Tom94/only-rounded-shader
Browse files Browse the repository at this point in the history
Cursor trail shader: target rounded fragment shader
  • Loading branch information
peppy authored Nov 13, 2022
2 parents 37e8b53 + 5c66f56 commit 05a035c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions osu.Game.Resources/Shaders/sh_CursorTrail.vs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ attribute vec2 m_TexCoord;
attribute vec4 m_TexRect;
attribute float m_Time;

varying vec2 v_DrawingPosition;
varying vec2 v_MaskingPosition;
varying vec4 v_Colour;
varying vec2 v_TexCoord;
varying vec4 v_TexRect;
varying vec2 v_BlendRange;

uniform mat4 g_ProjMatrix;
uniform mat3 g_ToMaskingSpace;
Expand All @@ -23,14 +23,11 @@ void main(void)
vec3 maskingPos = g_ToMaskingSpace * vec3(m_Position, 1.0);
v_MaskingPosition = maskingPos.xy / maskingPos.z;

// Transform to position to masking space.
vec3 drawingPos = g_ToDrawingSpace * vec3(m_Position, 1.0);
v_DrawingPosition = drawingPos.xy / drawingPos.z;

v_Colour = vec4(m_Colour.rgb, m_Colour.a * pow(clamp(m_Time - g_FadeClock, 0.0, 1.0), g_FadeExponent));

v_TexCoord = m_TexCoord;
v_TexRect = m_TexRect;
v_BlendRange = vec2(0.0);

gl_Position = g_ProjMatrix * vec4(m_Position, 1.0, 1.0);
}

0 comments on commit 05a035c

Please sign in to comment.