mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
79009d4158
This omission was noticed by Benjamin Otte. Add a premultiply uniform to the external shader, and add a separate premultiply shader for the non-external case.
20 lines
310 B
GLSL
20 lines
310 B
GLSL
// VERTEX_SHADER:
|
|
// premultiply.glsl
|
|
|
|
void main() {
|
|
gl_Position = u_projection * u_modelview * vec4(aPosition, 0.0, 1.0);
|
|
|
|
vUv = vec2(aUv.x, aUv.y);
|
|
}
|
|
|
|
// FRAGMENT_SHADER:
|
|
// premultiply.glsl
|
|
|
|
void main() {
|
|
vec4 color = GskTexture(u_source, vUv);
|
|
|
|
color.rgb *= color.a;
|
|
|
|
gskSetOutputColor(color);
|
|
}
|