1 void test_function(in int in_int, inout int out_int);
\r
2 int test_function1(in int in_int, inout int out_int);
\r
4 uniform float array_float[2];
\r
22 uniform float flt_uniform;
\r
23 uniform vec3 uniform_vec3;
\r
24 uniform mat3 uniform_mat3;
\r
26 varying vec3 varying_vec3;
\r
27 varying vec2 varying_vec2;
\r
28 varying vec4 varying_vec4;
\r
29 varying mat4 varying_mat4;
\r
30 varying mat2 varying_mat2;
\r
31 varying mat3 varying_mat3;
\r
32 varying float varying_flt;
\r
35 float frequencies[2];
\r
37 void test_function2(int func_int)
\r
42 const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
\r
43 const bool BoolConst1 = true && true || false;
\r
44 const bool BoolConst2 = false || !false && false;
\r
49 bool test_bool5 = 1.2 > 3.0 ;
\r
51 int test_int1 = 42;
\r
52 int test_int2 = 047;
\r
53 int test_int4 = 0xa8; // testing for hexadecimal numbers
\r
54 int test_int5 = 0xa8F; // testing for hexadecimal numbers
\r
56 float test_float1 = 1.5;
\r
57 float test_float2 = .01;
\r
58 float test_float3 = 10.;
\r
59 float test_float4 = 10.01;
\r
60 float test_float5 = 23e+2;
\r
61 float test_float6 = 23E-3;
\r
62 float test_float8 = 23E2;
\r
63 bool test_bool6 = BoolConst1 && ! (test_int1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (test_float1 != 0.0);
\r
65 vec4 color = vec4(0.0, 1.0, 0.0, 1.0);
\r
66 vec4 color2 = vec4(0.0);
\r
68 vec3 color4 = vec3(test_float8);
\r
70 ivec4 test_int_vect1 = ivec4(1.,1.,1.,1.);
\r
71 bvec4 test_bool_vect1 = bvec4(1., 1., 1. , 1. );
\r
73 vec2 test_vec2 = vec2(1., 1.);
\r
74 vec2 test_vec3 = vec2(1., 1);
\r
76 vec2 test_vec5 = vec2(color4);
\r
77 vec3 test_vec7 = vec3(color);
\r
78 vec3 test_vec8 = vec3(test_vec2, test_float4);
\r
79 vec3 test_vec9 = vec3(test_float4, test_vec2);
\r
81 vec4 test_vec10 = vec4(test_vec9, 0.01);
\r
82 vec4 test_vec11 = vec4(0.01, test_vec9);
\r
84 vec4 test_vec12 = vec4(test_vec2, test_vec2);
\r
86 mat2 test_mat2 = mat2(test_float3);
\r
87 mat3 test_mat3 = mat3(test_float3);
\r
88 mat4 test_mat4 = mat4(test_float3);
\r
90 mat2 test_mat7 = mat2(test_vec2, test_vec2);
\r
91 mat2 test_mat8 = mat2(01.01, 2.01, 3.01, 4.01);
\r
93 mat3 test_mat9 = mat3(test_vec7, test_vec7, test_vec7);
\r
94 mat4 test_mat10 = mat4(test_vec10, test_vec10, test_vec10, test_vec10);
\r
96 mat2 test_mat12 = mat2(test_vec2, 0.01, 0.01);
\r
97 mat2 test_mat13 = mat2(0.01, 5., test_vec2);
\r
98 mat2 test_mat14 = mat2(1, 5., test_vec2);
\r
99 mat2 test_mat15 = mat2(0.1, 5., test_vec2 );
\r
105 const int const_int = 5;
\r
108 test_function(test_int1, test_int1);
\r
109 test_function(test_int1, out_int);
\r
110 bool bool_var = true;
\r
111 int test_int6 = int(bool_var);
\r
112 test_float1 = float(bool_var);
\r
113 test_float1 = float(test_int6);
\r
114 test_int6 = int(test_float1);
\r
115 bool_var = bool(test_int6);
\r
116 bool_var = bool(test_float1);
\r
117 test_float1 = float(test_vec9);
\r
119 test_vec2.x = 1.2;
\r
120 test_vec2.y = 1.4;
\r
125 test_vec2[0] = 1.1;
\r
127 test_mat2[0][0] = 1.1;
\r
129 test_float1 += 1.0;
\r
130 test_float1 -= 1.0;
\r
131 test_float1 *= 1.0;
\r
132 test_float1 /= 1.0;
\r
134 test_mat12 *= test_mat13 ;
\r
135 test_mat12 *= test_float1;
\r
136 test_vec2 *= test_float1;
\r
137 test_vec2 *= test_mat12;
\r
144 test_mat12 = test_mat12 * test_mat13;
\r
145 test_vec2 = test_vec2 * test_vec5;
\r
150 test_float1 = 1.0;
\r
152 bool test_bool2 = test_float2 > test_float3;
\r
153 test_bool2 = test_float2 > test_float3;
\r
155 test_bool2 = test_int1 > test_int6 ;
\r
156 bool test_bool3, test_bool4;
\r
158 test_bool2 = test_bool3 && test_bool4;
\r
159 test_bool2 = test_bool3 || test_bool4;
\r
160 test_bool2 = test_bool3 ^^ test_bool4;
\r
162 test_bool2 = !test_bool3;
\r
164 test_bool3 = !(test_int1 > test_int6) ;
\r
166 test_float1 = test_int1 > test_int6 ? test_float2 : test_float3;
\r
167 test_vec2 = test_int1 > test_int6 ? test_vec2 : test_vec5;
\r
173 if(test_float1 > test_float2)
\r
187 for(int for_int=0; for_int < 5; for_int++)
\r
192 for(; test_bool2; )
\r
197 for(; test_bool2 = (test_float1 > test_float2); )
\r
201 for(int for_int1; test_bool2; )
\r
206 for(; test_bool2; test_float1++)
\r
211 while(bool b = (test_float1 > test_float2))
\r
217 while( test_bool2 )
\r
225 } while(test_bool2);
\r
227 if(test_float1 < 2.2)
\r
230 // FRAGMENT SHADER ONLY VARIABLES
\r
231 gl_FragColor = vec4(2.0, 3.0, 1.0, 1.1);
\r
233 color = gl_FragCoord ;
\r
234 gl_FragDepth = 1.0;
\r
236 test_bool2 = gl_FrontFacing ;
\r
240 // VARYING VARIABLES AVAILABLE IN FRAGMENT AND VERTEX SHADERS BOTH
\r
241 color = gl_TexCoord[0];
\r
242 float builtInF = gl_FogFragCoord;
\r
245 void test_function(in int in_int, inout int out_int)
\r
250 varying float var_flt ;
\r
252 int test_function1(int in_int, inout int out_int)
\r