2016-02-16 03:58:50 +00:00
|
|
|
#version 400
|
|
|
|
|
2015-11-16 04:33:39 +00:00
|
|
|
uniform sampler2D samp2D;
|
2016-01-23 00:47:22 +00:00
|
|
|
in vec2 coord;
|
2015-05-15 21:32:46 +00:00
|
|
|
|
|
|
|
struct lunarStruct1 {
|
|
|
|
int i;
|
|
|
|
float f;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct lunarStruct2 {
|
|
|
|
int i;
|
|
|
|
float f;
|
|
|
|
lunarStruct1 s1_1;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct lunarStruct3 {
|
|
|
|
lunarStruct2 s2_1[3];
|
|
|
|
int i;
|
|
|
|
float f;
|
|
|
|
lunarStruct1 s1_1;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-02-16 03:58:50 +00:00
|
|
|
flat in lunarStruct1 foo;
|
|
|
|
flat in lunarStruct2 foo2[5];
|
|
|
|
flat in lunarStruct3 foo3;
|
|
|
|
flat in int Count;
|
2015-05-15 21:32:46 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
float scale;
|
|
|
|
int iLocal = Count;
|
|
|
|
|
|
|
|
if (foo3.s2_1[1].i > 0)
|
|
|
|
scale = foo2[foo3.s2_1[foo.i].i + 2 + ++iLocal].s1_1.f;
|
|
|
|
else
|
|
|
|
scale = foo3.s2_1[0].s1_1.f;
|
|
|
|
|
|
|
|
//for (int i = 0; i < iLocal; ++i) {
|
|
|
|
// scale += foo2[i].f;
|
|
|
|
//}
|
|
|
|
|
2015-11-16 04:33:39 +00:00
|
|
|
gl_FragColor = scale * texture(samp2D, coord);
|
2015-05-15 21:32:46 +00:00
|
|
|
|
|
|
|
vec2[3] constructed = vec2[3](coord, vec2(scale), vec2(1.0, 2.0));
|
|
|
|
gl_FragColor += vec4(constructed[foo.i], constructed[foo.i]);
|
|
|
|
}
|
|
|
|
|