John Kessenich | 2f21fcc | 2015-06-17 16:15:09 +0000 | [diff] [blame] | 1 | #version 130
|
| 2 |
|
| 3 | uniform sampler2D sampler;
|
| 4 | varying mediump vec2 coord;
|
| 5 |
|
| 6 | struct lunarStruct1 {
|
| 7 | int i;
|
| 8 | float f;
|
| 9 | };
|
| 10 |
|
| 11 | struct lunarStruct2 {
|
| 12 | int i;
|
| 13 | float f;
|
| 14 | lunarStruct1 s1_1;
|
| 15 | };
|
| 16 |
|
| 17 | struct lunarStruct3 {
|
| 18 | lunarStruct2 s2_1;
|
| 19 | int i;
|
| 20 | float f;
|
| 21 | lunarStruct1 s1_1;
|
| 22 | };
|
| 23 |
|
| 24 |
|
| 25 | uniform lunarStruct1 foo;
|
| 26 | uniform lunarStruct2 foo2;
|
| 27 | uniform lunarStruct3 foo3;
|
| 28 |
|
| 29 | void main()
|
| 30 | {
|
| 31 | lunarStruct2 locals2;
|
| 32 |
|
| 33 | if (foo3.s2_1.i > 0)
|
| 34 | locals2 = foo3.s2_1;
|
| 35 | else
|
| 36 | locals2 = foo2;
|
| 37 |
|
| 38 | gl_FragColor = locals2.s1_1.f * texture2D(sampler, coord);
|
| 39 | }
|