summaryrefslogtreecommitdiffstats
path: root/glow/src/shader/quad.vert
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--glow/src/shader/quad.vert34
1 files changed, 17 insertions, 17 deletions
diff --git a/glow/src/shader/quad.vert b/glow/src/shader/quad.vert
index 2d2ebc3d..d37b5c8d 100644
--- a/glow/src/shader/quad.vert
+++ b/glow/src/shader/quad.vert
@@ -1,7 +1,7 @@
-#version 450
+#version 330
-layout(location = 0) uniform mat4 u_Transform;
-layout(location = 1) uniform float u_Scale;
+uniform mat4 u_Transform;
+uniform float u_Scale;
layout(location = 0) in vec2 i_Pos;
layout(location = 1) in vec2 i_Scale;
@@ -10,12 +10,12 @@ layout(location = 3) in vec4 i_BorderColor;
layout(location = 4) in float i_BorderRadius;
layout(location = 5) in float i_BorderWidth;
-layout(location = 0) out vec4 o_Color;
-layout(location = 1) out vec4 o_BorderColor;
-layout(location = 2) out vec2 o_Pos;
-layout(location = 3) out vec2 o_Scale;
-layout(location = 4) out float o_BorderRadius;
-layout(location = 5) out float o_BorderWidth;
+out vec4 v_Color;
+out vec4 v_BorderColor;
+out vec2 v_Pos;
+out vec2 v_Scale;
+out float v_BorderRadius;
+out float v_BorderWidth;
const vec2 positions[4] = vec2[](
vec2(0.0, 0.0),
@@ -25,7 +25,7 @@ const vec2 positions[4] = vec2[](
);
void main() {
- vec2 v_Pos = positions[gl_VertexID];
+ vec2 q_Pos = positions[gl_VertexID];
vec2 p_Pos = i_Pos * u_Scale;
vec2 p_Scale = i_Scale * u_Scale;
@@ -36,12 +36,12 @@ void main() {
vec4(p_Pos - vec2(0.5, 0.5), 0.0, 1.0)
);
- o_Color = i_Color;
- o_BorderColor = i_BorderColor;
- o_Pos = p_Pos;
- o_Scale = p_Scale;
- o_BorderRadius = i_BorderRadius * u_Scale;
- o_BorderWidth = i_BorderWidth * u_Scale;
+ v_Color = i_Color;
+ v_BorderColor = i_BorderColor;
+ v_Pos = p_Pos;
+ v_Scale = p_Scale;
+ v_BorderRadius = i_BorderRadius * u_Scale;
+ v_BorderWidth = i_BorderWidth * u_Scale;
- gl_Position = u_Transform * i_Transform * vec4(v_Pos, 0.0, 1.0);
+ gl_Position = u_Transform * i_Transform * vec4(q_Pos, 0.0, 1.0);
}