1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 12:27:26 +08:00
osu-lazer/osu.Game.Tests/Resources/Shaders/sh_TestVertex.vs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
834 B
Plaintext
Raw Normal View History

2023-05-02 16:51:05 +08:00
layout(location = 0) in highp vec2 m_Position;
layout(location = 1) in lowp vec4 m_Colour;
layout(location = 2) in highp vec2 m_TexCoord;
layout(location = 3) in highp vec4 m_TexRect;
layout(location = 4) in mediump vec2 m_BlendRange;
2023-05-02 16:51:05 +08:00
layout(location = 0) out highp vec2 v_MaskingPosition;
layout(location = 1) out lowp vec4 v_Colour;
layout(location = 2) out highp vec2 v_TexCoord;
layout(location = 3) out highp vec4 v_TexRect;
layout(location = 4) out mediump vec2 v_BlendRange;
void main(void)
{
2023-05-02 16:51:05 +08:00
// Transform from screen space to masking space.
2023-09-13 22:10:13 +08:00
highp vec3 maskingPos = g_ToMaskingSpace * vec3(m_Position, 1.0);
2023-05-02 16:51:05 +08:00
v_MaskingPosition = maskingPos.xy / maskingPos.z;
2023-05-02 16:51:05 +08:00
v_Colour = m_Colour;
v_TexCoord = m_TexCoord;
v_TexRect = m_TexRect;
v_BlendRange = m_BlendRange;
2023-05-02 16:51:05 +08:00
gl_Position = g_ProjMatrix * vec4(m_Position, 1.0, 1.0);
}