1 group trivial "Trivial expressions"
4 values { output float out0 = 5.0; }
20 values { output int out0 = 5; }
22 precision highp float;
35 values { output bool out0 = true; }
37 precision highp float;
50 values { output float out0 = 1.0; }
52 precision highp float;
57 const float a = float(int(bool(true)));
66 group operators "Operators"
69 values { output float out0 = 2.19; }
71 precision highp float;
76 const float a = 6.0/3.5 + 1.8*2.6 - 4.2;
84 values { output float out0 = 15.0; }
86 precision highp float;
91 const vec3 a = (vec4(1.0, 2.0, 3.0, 4.0).zyx * vec3(1.0, 1.5, 3.0).xyz).xzy + (vec2(5.0)/vec2(2.5)).xxy;
92 out0 = a.x + a.y + a.z;
99 values { output int out0 = 7; }
106 const int a = 5-1 + 2*3 - 9/3;
114 values { output int out0 = 21; }
121 const ivec3 a = ivec2(5-1, 4).xxy + ivec4(1*3, 9/3, 1+2, 8/4).xyz;
122 out0 = a.x + a.y + a.z;
129 values { output float out0 = 8.0; }
131 precision highp float;
136 const mat3 a = mat3(3.0) * mat3(4.0);
137 const mat4 b = mat4(a[1][1])*2.0;
138 const mat2 c = mat2(b[0][0]) / 3.0;
139 out0 = c[0][0]+c[1][0];
146 values { output bool out0 = true; }
153 const bool a = (!false || false) && (true ^^ false);
161 values { output bool out0 = true; }
168 const bool a = (false == false) && (true != false) && (1 < 2) && (3 <= 3) && ((1 > 1) != (1 >= 1));
176 values { output float out0 = 5.3; }
178 precision highp float;
183 const float a = false ? 0.0 : (true ? 5.3 : 1.0);
192 group complex_types "Arrays, structs & nested calls"
195 values { output float out0 = 260.922; }
197 precision highp float;
208 const S s = S(vec4(1.5), 123);
209 out0 = length(s.a.xy)*float(s.b);
216 values { output float out0 = 965.9; }
218 precision highp float;
242 const S s = S(vec4(1.5), 123);
243 const T t = T(s, false, 3);
245 const U v = U(S(vec4(1.3), 4), T(S(vec4(2.0), 5), true, 6));
246 out0 = float(u.s.i*v.t.i + v.t.s.i)*v.s.v.x; // float(123*6 + 5)*1.3
255 input float in0 = [ 0.0 | 1.0];
256 output float out0 = [0.0 | 1.0];
259 precision highp float;
264 float a[int(max(-1.0, 2.0))];
267 out0 = a[int(min(1.0, 2.0))];
273 case nested_builtin_funcs
274 values { output float out0 = 3.05; }
276 precision highp float;
281 const float a = sqrt( atan(sin(1.5)/cos(1.5)) /*1.5*/ * log2(exp2(log(exp(6.2) + 0.1)) + 0.1) /*~6.2*/);