summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/glslang/src/Test/flowControl.frag
blob: a6ef419d29d5cf2fe02e0e39a92f8d5d27298b24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#version 120

uniform float d;
uniform vec4 bigColor, smallColor;
uniform vec4 otherColor;

varying float c;
varying vec4 BaseColor;

void main()
{
    vec4 color = BaseColor;
    vec4 color2;

    color2 = otherColor;

    if (c > d)
        color += bigColor;
    else
        color += smallColor;

    gl_FragColor = color * color2;
}