2016-01-23 00:47:22 +00:00
|
|
|
#version 140
|
2015-05-15 21:32:46 +00:00
|
|
|
|
2016-02-16 03:58:50 +00:00
|
|
|
in vec4 bigColor;
|
2015-05-15 21:32:46 +00:00
|
|
|
in vec4 BaseColor;
|
|
|
|
in float f;
|
|
|
|
|
2016-02-16 03:58:50 +00:00
|
|
|
flat in int Count;
|
|
|
|
flat in uvec4 v4;
|
2015-05-15 21:32:46 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec4 color = BaseColor;
|
|
|
|
|
|
|
|
for (int i = 0; i < Count; ++i) {
|
|
|
|
color += bigColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
gl_FragColor = color;
|
|
|
|
|
|
|
|
float sum = 0.0;
|
|
|
|
for (int i = 0; i < 4; ++i)
|
|
|
|
sum += v4[i];
|
|
|
|
|
|
|
|
vec4 tv4;
|
|
|
|
|
|
|
|
for (int i = 0; i < 4; ++i)
|
|
|
|
tv4[i] = v4[i] * 4u;
|
|
|
|
|
|
|
|
gl_FragColor += vec4(sum) + tv4;
|
|
|
|
|
|
|
|
vec4 r;
|
|
|
|
r.xyz = BaseColor.xyz;
|
|
|
|
|
|
|
|
for (int i = 0; i < Count; ++i)
|
|
|
|
r.w = f;
|
|
|
|
|
|
|
|
gl_FragColor.xyz += r.xyz;
|
|
|
|
|
|
|
|
for (int i = 0; i < 16; i += 4)
|
|
|
|
gl_FragColor *= f;
|
|
|
|
}
|