blob: 0da72e1941c5814697068e72fd36fdda9a6add4c [file] [log] [blame]
John Kessenichf6eae2a2016-01-22 17:47:22 -07001#version 140
John Kessenich39374da2015-05-15 21:32:46 +00002
3uniform vec4 bigColor;
4in vec4 BaseColor;
5in float f;
6
7uniform int Count;
8uniform uvec4 v4;
9
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}