1#version 140 2 3in vec4 bigColor; 4in vec4 BaseColor; 5in float f; 6 7flat in int Count; 8flat in 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} 42