blob: ca95ec37d56307246d7d16f8bbb5c8dac0f0f171 [file] [log] [blame]
John Kessenichf6eae2a2016-01-22 17:47:22 -07001#version 140
John Kessenich39374da2015-05-15 21:32:46 +00002
John Kessenich32c169d2016-08-03 17:35:19 -06003precision mediump int;
4
John Kessenich55e7d112015-11-15 21:33:39 -07005uniform sampler2D samp2D;
John Kessenichf6eae2a2016-01-22 17:47:22 -07006in mediump vec2 coord;
John Kessenich39374da2015-05-15 21:32:46 +00007
8struct lunarStruct1 {
9 int i;
10 float f;
11};
12
13struct lunarStruct2 {
14 int i;
15 float f;
16 lunarStruct1 s1_1;
17};
18
19struct lunarStruct3 {
20 lunarStruct2 s2_1;
21 int i;
22 float f;
23 lunarStruct1 s1_1;
24};
25
26
John Kessenich6c292d32016-02-15 20:58:50 -070027lunarStruct1 foo;
28lunarStruct2 foo2;
29lunarStruct3 foo3;
John Kessenich39374da2015-05-15 21:32:46 +000030
31void main()
32{
33 lunarStruct2 locals2;
34
35 if (foo3.s2_1.i > 0)
36 locals2 = foo3.s2_1;
37 else
38 locals2 = foo2;
39
John Kessenich55e7d112015-11-15 21:33:39 -070040 gl_FragColor = locals2.s1_1.f * texture(samp2D, coord);
John Kessenich39374da2015-05-15 21:32:46 +000041}