prosperon/source/shaders/poly.sglsl

31 lines
413 B
Plaintext

@vs polyvs
in vec2 apos;
in vec2 vuv;
in vec4 acolor;
out vec4 color;
out vec2 uv;
uniform polyvs_params { mat4 proj; };
void main()
{
color = acolor;
uv = vuv;
gl_Position = proj * vec4(apos, 0.0, 1.0);
}
@end
@fs polyfs
in vec4 color;
in vec2 uv;
out vec4 fcolor;
void main()
{
fcolor = color;
fcolor.x *= (1 + uv.x/100.0); /* Temp dbg fix so vuv compiles */
}
@end
@program poly polyvs polyfs