John Kessenich | f6eae2a | 2016-01-22 17:47:22 -0700 | [diff] [blame] | 1 | #version 140
|
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2 | uniform sampler2D samp2D;
|
John Kessenich | f6eae2a | 2016-01-22 17:47:22 -0700 | [diff] [blame] | 3 | in vec2 coord;
|
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 4 |
|
| 5 | struct lunarStruct1 {
|
| 6 | int i;
|
| 7 | float f[4];
|
| 8 | vec4 color[5];
|
| 9 | };
|
| 10 |
|
| 11 | struct lunarStruct2 {
|
| 12 | int i[5];
|
| 13 | float f;
|
| 14 | lunarStruct1 s1_1[7];
|
| 15 | };
|
| 16 |
|
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 17 | lunarStruct1 foo;
|
| 18 | lunarStruct2 foo2[5];
|
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 19 |
|
| 20 | void 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 Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 29 | gl_FragColor = scale * texture(samp2D, coord);
|
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 30 | }
|
| 31 |
|