gtk2/gsk/resources/glsl/blit.glsl
Timm Bäder cc909b160f gl renderer: Rewrite shader builder
Use a unified approach to write both vertex and fragment shader in the
same file.
2020-01-07 17:27:15 +01:00

14 lines
251 B
GLSL

// VERTEX_SHADER:
void main() {
gl_Position = u_projection * u_modelview * vec4(aPosition, 0.0, 1.0);
vUv = vec2(aUv.x, aUv.y);
}
// FRAGMENT_SHADER:
void main() {
vec4 diffuse = Texture(u_source, vUv);
setOutputColor(diffuse * u_alpha);
}