+uniform GlobalValues
+{
+ vec4 tint;
+ vec2 scale;
+};
+
#pragma MSP stage(vertex)
layout(location=0) in vec4 position;
layout(location=1) in vec4 color;
} vs_out;
void main()
{
- vs_out.texcoord = position.xy*0.5+0.5;
+ vs_out.texcoord = position.xy*scale*0.5+0.5;
vs_out.color = color;
gl_Position = position;
}
layout(location=0) out vec4 frag_color;
void main()
{
- frag_color = vs_out.color;
+ scale = vec2(1.0);
+ frag_color = vs_out.color*tint;
}
/* Expected output: vertex
+uniform GlobalValues
+{
+ vec4 tint;
+ vec2 scale;
+};
layout(location=0) in vec4 position;
layout(location=1) in vec4 color;
out VertexOut
} vs_out;
void main()
{
- vs_out.texcoord = position.xy*0.5+0.5;
+ vs_out.texcoord = position.xy*scale*0.5+0.5;
vs_out.color = color;
gl_Position = position;
}
*/
/* Expected output: fragment
+uniform GlobalValues
+{
+ vec4 tint;
+ vec2 scale;
+};
layout(location=0) out vec4 frag_color;
in VertexOut
{
} vs_out;
void main()
{
- frag_color = vs_out.color;
+ frag_color = vs_out.color*tint;
}
*/