Debian Codegraph @

gdk/resources/glsl/gles2-texture.fs.glsl

raw
1 precision mediump float;
2
3 uniform sampler2D map;
4 uniform int flipColors;
5
6 varying highp vec2 vUv;
7
8 void main() {
9 vec4 color = texture2D(map, vUv);
10
11 /* Flip R and B around to match the Cairo convention, if required */
12 if (flipColors == 1)
13 gl_FragColor = vec4(color.z, color.y, color.x, color.w);
14 else
15 gl_FragColor = color;
16 }