gtk2/gsk/ngl/resources/blit.glsl
Matthias Clasen 51074ca5df ngl: Small shader improvements
Add a variant of gskSetOutputColor that saves a
few multiplications, and use it where possible.
2021-03-14 16:49:31 -04:00

18 lines
290 B
GLSL

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