• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 130
2uniform sampler2D sampler;
3varying vec2 coord;
4
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
17uniform lunarStruct1 foo;
18uniform lunarStruct2 foo2[5];
19
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
29	gl_FragColor =  scale * texture2D(sampler, coord);
30}
31
32