blob: b81b9547ac01d88581ece835e479983b218b6e2b [file] [log] [blame]
John Kessenichf6eae2a2016-01-22 17:47:22 -07001#version 140
John Kessenich55e7d112015-11-15 21:33:39 -07002uniform sampler2D samp2D;
John Kessenichf6eae2a2016-01-22 17:47:22 -07003in vec2 coord;
John Kessenich39374da2015-05-15 21:32:46 +00004
5struct lunarStruct1 {
6 int i;
7 float f[4];
8 vec4 color[5];
9};
10
11struct lunarStruct2 {
12 int i[5];
13 float f;
14 lunarStruct1 s1_1[7];
15};
16
John Kessenich6c292d32016-02-15 20:58:50 -070017lunarStruct1 foo;
18lunarStruct2 foo2[5];
John Kessenich39374da2015-05-15 21:32:46 +000019
20void main()
21{
22 float scale = 0.0;
23
24 if (foo2[3].i[4] > 0)
25 scale = foo2[3].s1_1[2].color[3].x;
26 else
27 scale = foo2[3].s1_1[2].f[3];
28
John Kessenich55e7d112015-11-15 21:33:39 -070029 gl_FragColor = scale * texture(samp2D, coord);
John Kessenich39374da2015-05-15 21:32:46 +000030}
31