blob: dfa58ad42cc65fd2c81996e110010a84c03defcf [file] [log] [blame]
John Kessenichf6eae2a2016-01-22 17:47:22 -07001#version 140
John Kessenich39374da2015-05-15 21:32:46 +00002
John Kessenich6c292d32016-02-15 20:58:50 -07003in vec4 bigColor;
John Kessenich39374da2015-05-15 21:32:46 +00004in vec4 BaseColor;
5in float f;
6
John Kessenich6c292d32016-02-15 20:58:50 -07007flat in int Count;
8flat in uvec4 v4;
John Kessenich39374da2015-05-15 21:32:46 +00009
10void main()
11{
12 vec4 color = BaseColor;
13
14 for (int i = 0; i < Count; ++i) {
15 color += bigColor;
16 }
17
18 gl_FragColor = color;
19
20 float sum = 0.0;
21 for (int i = 0; i < 4; ++i)
22 sum += v4[i];
23
24 vec4 tv4;
25
26 for (int i = 0; i < 4; ++i)
27 tv4[i] = v4[i] * 4u;
28
29 gl_FragColor += vec4(sum) + tv4;
30
31 vec4 r;
32 r.xyz = BaseColor.xyz;
33
34 for (int i = 0; i < Count; ++i)
35 r.w = f;
36
37 gl_FragColor.xyz += r.xyz;
38
39 for (int i = 0; i < 16; i += 4)
40 gl_FragColor *= f;
41}