aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag
blob: 044b3bad58d0a38d6e34460564d82ece1c42e5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
uniform lowp vec4 color1;
uniform lowp vec4 color2;
uniform highp vec2 pixelSize;

varying highp vec2 qt_TexCoord0;

void main()
{
    highp vec2 tc = sign(sin(3.14159265358979323846 * qt_TexCoord0 * pixelSize));
    if (tc.x != tc.y)
        gl_FragColor = color1;
    else
        gl_FragColor = color2;
}