1{
2  is_2d: #false;
3  is_3d: #true;
4  bbox: [[-21.3125,-7.625,-15.4375],[20.875,47.4375,15.4375]];
5  shader:
6    "#define AA 1
7    |#define TAA 1
8    |#define FDUR 0.04
9    |const vec3 background_colour = vec3(1,1,1);
10    |const int ray_max_iter = 200;
11    |const float ray_max_depth = 400.0;
12    |#ifdef GLSLVIEWER
13    |uniform vec3 u_eye3d;
14    |uniform vec3 u_centre3d;
15    |uniform vec3 u_up3d;
16    |#endif
17    |uniform float rv_smoothness;
18    |float dist(vec4 r0)
19    |{
20    |  /* constants */
21    |  float r1 = 1.0/0.0;
22    |  vec3 r3 = vec3(0.0,0.0,0.0);
23    |  float r15 = 5.0;
24    |  float r17 = rv_smoothness;
25    |  float r19 = 0.5;
26    |  float r24 = 0.0;
27    |  float r25 = 1.0;
28    |  vec3 r38 = vec3(-1.0,-2.0,4.5);
29    |  vec3 r53 = vec3(1.0,-2.0,4.5);
30    |  vec3 r68 = vec3(0.0,0.0,4.5);
31    |  float r81 = 4.0;
32    |  vec3 r131 = vec3(0.0,12.0,0.0);
33    |  float r143 = 10.0;
34    |  vec3 r162 = vec3(0.0,12.0,9.8);
35    |  vec3 r177 = vec3(0.0,10.0,9.6);
36    |  vec3 r192 = vec3(0.0,8.0,9.0);
37    |  vec3 r207 = vec3(-10.0,12.0,0.0);
38    |  float r217 = -1.5707963267948966;
39    |  vec3 r218 = vec3(0.0,1.0,0.0);
40    |  float r265 = 1.5;
41    |  vec3 r313 = vec3(10.0,12.0,0.0);
42    |  float r323 = 1.5707963267948966;
43    |  vec3 r324 = vec3(0.0,1.0,0.0);
44    |  vec3 r418 = vec3(0.0,32.0,0.0);
45    |  float r430 = 15.0;
46    |  /* body */
47    |  float r2 = r0.x;
48    |  float r4 = r3.x;
49    |  float r5 = r2-r4;
50    |  float r6 = r0.y;
51    |  float r7 = r3.y;
52    |  float r8 = r6-r7;
53    |  float r9 = r0.z;
54    |  float r10 = r3.z;
55    |  float r11 = r9-r10;
56    |  float r12 = r0.w;
57    |  vec3 r13 = vec3(r5,r8,r11);
58    |  float r14 = length(r13);
59    |  float r16 = r14-r15;
60    |  bool r18 =(r1 == r1);
61    |  float r20 = r16-r1;
62    |  float r21 = r19*r20;
63    |  float r22 = r21/r17;
64    |  float r23 = r19+r22;
65    |  float r26 = max(r23,r24);
66    |  float r27 = min(r26,r25);
67    |  float r28 = r25-r27;
68    |  float r29 = r16*r28;
69    |  float r30 = r1*r27;
70    |  float r31 = r29+r30;
71    |  float r32 = r17*r27;
72    |  float r33 = r25-r27;
73    |  float r34 = r32*r33;
74    |  float r35 = r31-r34;
75    |  float r36 =(r18 ? r16 : r35);
76    |  float r37 = r0.x;
77    |  float r39 = r38.x;
78    |  float r40 = r37-r39;
79    |  float r41 = r0.y;
80    |  float r42 = r38.y;
81    |  float r43 = r41-r42;
82    |  float r44 = r0.z;
83    |  float r45 = r38.z;
84    |  float r46 = r44-r45;
85    |  float r47 = r0.w;
86    |  vec3 r48 = vec3(r40,r43,r46);
87    |  float r49 = length(r48);
88    |  float r50 = r49-r19;
89    |  float r51 = min(r36,r50);
90    |  float r52 = r0.x;
91    |  float r54 = r53.x;
92    |  float r55 = r52-r54;
93    |  float r56 = r0.y;
94    |  float r57 = r53.y;
95    |  float r58 = r56-r57;
96    |  float r59 = r0.z;
97    |  float r60 = r53.z;
98    |  float r61 = r59-r60;
99    |  float r62 = r0.w;
100    |  vec3 r63 = vec3(r55,r58,r61);
101    |  float r64 = length(r63);
102    |  float r65 = r64-r19;
103    |  float r66 = min(r51,r65);
104    |  float r67 = r0.x;
105    |  float r69 = r68.x;
106    |  float r70 = r67-r69;
107    |  float r71 = r0.y;
108    |  float r72 = r68.y;
109    |  float r73 = r71-r72;
110    |  float r74 = r0.z;
111    |  float r75 = r68.z;
112    |  float r76 = r74-r75;
113    |  float r77 = r0.w;
114    |  vec2 r78 = vec2(r70,r73);
115    |  float r79 = length(r78);
116    |  vec2 r80 = vec2(r79,r76);
117    |  vec2 r82 = vec2(r24,r81);
118    |  vec2 r83 = r80-r82;
119    |  vec2 r84 = vec2(r81,r19);
120    |  float r85 = length(r84);
121    |  vec2 r86 = vec2(r85);
122    |  vec2 r87 = r84/r86;
123    |  float r88 = dot(r83,r87);
124    |  float r89 = r87.y;
125    |  float r90 = r87.x;
126    |  float r91 = -(r90);
127    |  vec2 r92 = vec2(r89,r91);
128    |  float r93 = dot(r83,r92);
129    |  float r94 = r80.y;
130    |  float r95 = -(r94);
131    |  float r96 = max(r88,r95);
132    |  float r97=r96;
133    |  float r98 = r80.y;
134    |  bool r99 = r98>r81;
135    |  bool r100 = r93<r24;
136    |  bool r101 =(r99 && r100);
137    |  if (r101) {
138    |  float r102 = length(r83);
139    |  float r103 = max(r97,r102);
140    |  r97=r103;
141    |  }
142    |  float r104 = r80.x;
143    |  bool r105 = r104>r19;
144    |  vec2 r106 = vec2(r81,r19);
145    |  float r107 = length(r106);
146    |  bool r108 = r93>r107;
147    |  bool r109 =(r105 && r108);
148    |  if (r109) {
149    |  vec2 r110 = vec2(r19,r24);
150    |  vec2 r111 = r80-r110;
151    |  float r112 = length(r111);
152    |  float r113 = max(r97,r112);
153    |  r97=r113;
154    |  }
155    |  bool r114 =(r66 == r1);
156    |  float r115 = r97-r66;
157    |  float r116 = r19*r115;
158    |  float r117 = r116/r17;
159    |  float r118 = r19+r117;
160    |  float r119 = max(r118,r24);
161    |  float r120 = min(r119,r25);
162    |  float r121 = r25-r120;
163    |  float r122 = r97*r121;
164    |  float r123 = r66*r120;
165    |  float r124 = r122+r123;
166    |  float r125 = r17*r120;
167    |  float r126 = r25-r120;
168    |  float r127 = r125*r126;
169    |  float r128 = r124-r127;
170    |  float r129 =(r114 ? r97 : r128);
171    |  float r130 = r0.x;
172    |  float r132 = r131.x;
173    |  float r133 = r130-r132;
174    |  float r134 = r0.y;
175    |  float r135 = r131.y;
176    |  float r136 = r134-r135;
177    |  float r137 = r0.z;
178    |  float r138 = r131.z;
179    |  float r139 = r137-r138;
180    |  float r140 = r0.w;
181    |  vec3 r141 = vec3(r133,r136,r139);
182    |  float r142 = length(r141);
183    |  float r144 = r142-r143;
184    |  bool r145 =(r129 == r1);
185    |  float r146 = r144-r129;
186    |  float r147 = r19*r146;
187    |  float r148 = r147/r17;
188    |  float r149 = r19+r148;
189    |  float r150 = max(r149,r24);
190    |  float r151 = min(r150,r25);
191    |  float r152 = r25-r151;
192    |  float r153 = r144*r152;
193    |  float r154 = r129*r151;
194    |  float r155 = r153+r154;
195    |  float r156 = r17*r151;
196    |  float r157 = r25-r151;
197    |  float r158 = r156*r157;
198    |  float r159 = r155-r158;
199    |  float r160 =(r145 ? r144 : r159);
200    |  float r161 = r0.x;
201    |  float r163 = r162.x;
202    |  float r164 = r161-r163;
203    |  float r165 = r0.y;
204    |  float r166 = r162.y;
205    |  float r167 = r165-r166;
206    |  float r168 = r0.z;
207    |  float r169 = r162.z;
208    |  float r170 = r168-r169;
209    |  float r171 = r0.w;
210    |  vec3 r172 = vec3(r164,r167,r170);
211    |  float r173 = length(r172);
212    |  float r174 = r173-r19;
213    |  float r175 = min(r160,r174);
214    |  float r176 = r0.x;
215    |  float r178 = r177.x;
216    |  float r179 = r176-r178;
217    |  float r180 = r0.y;
218    |  float r181 = r177.y;
219    |  float r182 = r180-r181;
220    |  float r183 = r0.z;
221    |  float r184 = r177.z;
222    |  float r185 = r183-r184;
223    |  float r186 = r0.w;
224    |  vec3 r187 = vec3(r179,r182,r185);
225    |  float r188 = length(r187);
226    |  float r189 = r188-r19;
227    |  float r190 = min(r175,r189);
228    |  float r191 = r0.x;
229    |  float r193 = r192.x;
230    |  float r194 = r191-r193;
231    |  float r195 = r0.y;
232    |  float r196 = r192.y;
233    |  float r197 = r195-r196;
234    |  float r198 = r0.z;
235    |  float r199 = r192.z;
236    |  float r200 = r198-r199;
237    |  float r201 = r0.w;
238    |  vec3 r202 = vec3(r194,r197,r200);
239    |  float r203 = length(r202);
240    |  float r204 = r203-r19;
241    |  float r205 = min(r190,r204);
242    |  float r206 = r0.x;
243    |  float r208 = r207.x;
244    |  float r209 = r206-r208;
245    |  float r210 = r0.y;
246    |  float r211 = r207.y;
247    |  float r212 = r210-r211;
248    |  float r213 = r0.z;
249    |  float r214 = r207.z;
250    |  float r215 = r213-r214;
251    |  float r216 = r0.w;
252    |  vec3 r219 = vec3(r209,r212,r215);
253    |  float r220 = cos(r217);
254    |  vec3 r221 = vec3(r220);
255    |  vec3 r222 = r219*r221;
256    |  float r223 = r218.y;
257    |  float r224 = r219.z;
258    |  float r225 = r223*r224;
259    |  float r226 = r218.z;
260    |  float r227 = r219.y;
261    |  float r228 = r226*r227;
262    |  float r229 = r225-r228;
263    |  float r230 = r218.z;
264    |  float r231 = r219.x;
265    |  float r232 = r230*r231;
266    |  float r233 = r218.x;
267    |  float r234 = r219.z;
268    |  float r235 = r233*r234;
269    |  float r236 = r232-r235;
270    |  float r237 = r218.x;
271    |  float r238 = r219.y;
272    |  float r239 = r237*r238;
273    |  float r240 = r218.y;
274    |  float r241 = r219.x;
275    |  float r242 = r240*r241;
276    |  float r243 = r239-r242;
277    |  vec3 r244 = vec3(r229,r236,r243);
278    |  float r245 = sin(r217);
279    |  vec3 r246 = vec3(r245);
280    |  vec3 r247 = r244*r246;
281    |  vec3 r248 = r222-r247;
282    |  float r249 = cos(r217);
283    |  float r250 = r25-r249;
284    |  vec3 r251 = vec3(r250);
285    |  vec3 r252 = r219*r251;
286    |  float r253 = dot(r218,r252);
287    |  vec3 r254 = vec3(r253);
288    |  vec3 r255 = r218*r254;
289    |  vec3 r256 = r248+r255;
290    |  float r257 = r256.x;
291    |  float r258 = r256.y;
292    |  float r259 = r256.z;
293    |  vec2 r260 = vec2(r257,r258);
294    |  float r261 = length(r260);
295    |  vec2 r262 = vec2(r261,r259);
296    |  vec2 r263 = vec2(r24,r143);
297    |  vec2 r264 = r262-r263;
298    |  vec2 r266 = vec2(r143,r265);
299    |  float r267 = length(r266);
300    |  vec2 r268 = vec2(r267);
301    |  vec2 r269 = r266/r268;
302    |  float r270 = dot(r264,r269);
303    |  float r271 = r269.y;
304    |  float r272 = r269.x;
305    |  float r273 = -(r272);
306    |  vec2 r274 = vec2(r271,r273);
307    |  float r275 = dot(r264,r274);
308    |  float r276 = r262.y;
309    |  float r277 = -(r276);
310    |  float r278 = max(r270,r277);
311    |  float r279=r278;
312    |  float r280 = r262.y;
313    |  bool r281 = r280>r143;
314    |  bool r282 = r275<r24;
315    |  bool r283 =(r281 && r282);
316    |  if (r283) {
317    |  float r284 = length(r264);
318    |  float r285 = max(r279,r284);
319    |  r279=r285;
320    |  }
321    |  float r286 = r262.x;
322    |  bool r287 = r286>r265;
323    |  vec2 r288 = vec2(r143,r265);
324    |  float r289 = length(r288);
325    |  bool r290 = r275>r289;
326    |  bool r291 =(r287 && r290);
327    |  if (r291) {
328    |  vec2 r292 = vec2(r265,r24);
329    |  vec2 r293 = r262-r292;
330    |  float r294 = length(r293);
331    |  float r295 = max(r279,r294);
332    |  r279=r295;
333    |  }
334    |  bool r296 =(r205 == r1);
335    |  float r297 = r279-r205;
336    |  float r298 = r19*r297;
337    |  float r299 = r298/r17;
338    |  float r300 = r19+r299;
339    |  float r301 = max(r300,r24);
340    |  float r302 = min(r301,r25);
341    |  float r303 = r25-r302;
342    |  float r304 = r279*r303;
343    |  float r305 = r205*r302;
344    |  float r306 = r304+r305;
345    |  float r307 = r17*r302;
346    |  float r308 = r25-r302;
347    |  float r309 = r307*r308;
348    |  float r310 = r306-r309;
349    |  float r311 =(r296 ? r279 : r310);
350    |  float r312 = r0.x;
351    |  float r314 = r313.x;
352    |  float r315 = r312-r314;
353    |  float r316 = r0.y;
354    |  float r317 = r313.y;
355    |  float r318 = r316-r317;
356    |  float r319 = r0.z;
357    |  float r320 = r313.z;
358    |  float r321 = r319-r320;
359    |  float r322 = r0.w;
360    |  vec3 r325 = vec3(r315,r318,r321);
361    |  float r326 = cos(r323);
362    |  vec3 r327 = vec3(r326);
363    |  vec3 r328 = r325*r327;
364    |  float r329 = r324.y;
365    |  float r330 = r325.z;
366    |  float r331 = r329*r330;
367    |  float r332 = r324.z;
368    |  float r333 = r325.y;
369    |  float r334 = r332*r333;
370    |  float r335 = r331-r334;
371    |  float r336 = r324.z;
372    |  float r337 = r325.x;
373    |  float r338 = r336*r337;
374    |  float r339 = r324.x;
375    |  float r340 = r325.z;
376    |  float r341 = r339*r340;
377    |  float r342 = r338-r341;
378    |  float r343 = r324.x;
379    |  float r344 = r325.y;
380    |  float r345 = r343*r344;
381    |  float r346 = r324.y;
382    |  float r347 = r325.x;
383    |  float r348 = r346*r347;
384    |  float r349 = r345-r348;
385    |  vec3 r350 = vec3(r335,r342,r349);
386    |  float r351 = sin(r323);
387    |  vec3 r352 = vec3(r351);
388    |  vec3 r353 = r350*r352;
389    |  vec3 r354 = r328-r353;
390    |  float r355 = cos(r323);
391    |  float r356 = r25-r355;
392    |  vec3 r357 = vec3(r356);
393    |  vec3 r358 = r325*r357;
394    |  float r359 = dot(r324,r358);
395    |  vec3 r360 = vec3(r359);
396    |  vec3 r361 = r324*r360;
397    |  vec3 r362 = r354+r361;
398    |  float r363 = r362.x;
399    |  float r364 = r362.y;
400    |  float r365 = r362.z;
401    |  vec2 r366 = vec2(r363,r364);
402    |  float r367 = length(r366);
403    |  vec2 r368 = vec2(r367,r365);
404    |  vec2 r369 = vec2(r24,r143);
405    |  vec2 r370 = r368-r369;
406    |  vec2 r371 = vec2(r143,r265);
407    |  float r372 = length(r371);
408    |  vec2 r373 = vec2(r372);
409    |  vec2 r374 = r371/r373;
410    |  float r375 = dot(r370,r374);
411    |  float r376 = r374.y;
412    |  float r377 = r374.x;
413    |  float r378 = -(r377);
414    |  vec2 r379 = vec2(r376,r378);
415    |  float r380 = dot(r370,r379);
416    |  float r381 = r368.y;
417    |  float r382 = -(r381);
418    |  float r383 = max(r375,r382);
419    |  float r384=r383;
420    |  float r385 = r368.y;
421    |  bool r386 = r385>r143;
422    |  bool r387 = r380<r24;
423    |  bool r388 =(r386 && r387);
424    |  if (r388) {
425    |  float r389 = length(r370);
426    |  float r390 = max(r384,r389);
427    |  r384=r390;
428    |  }
429    |  float r391 = r368.x;
430    |  bool r392 = r391>r265;
431    |  vec2 r393 = vec2(r143,r265);
432    |  float r394 = length(r393);
433    |  bool r395 = r380>r394;
434    |  bool r396 =(r392 && r395);
435    |  if (r396) {
436    |  vec2 r397 = vec2(r265,r24);
437    |  vec2 r398 = r368-r397;
438    |  float r399 = length(r398);
439    |  float r400 = max(r384,r399);
440    |  r384=r400;
441    |  }
442    |  bool r401 =(r311 == r1);
443    |  float r402 = r384-r311;
444    |  float r403 = r19*r402;
445    |  float r404 = r403/r17;
446    |  float r405 = r19+r404;
447    |  float r406 = max(r405,r24);
448    |  float r407 = min(r406,r25);
449    |  float r408 = r25-r407;
450    |  float r409 = r384*r408;
451    |  float r410 = r311*r407;
452    |  float r411 = r409+r410;
453    |  float r412 = r17*r407;
454    |  float r413 = r25-r407;
455    |  float r414 = r412*r413;
456    |  float r415 = r411-r414;
457    |  float r416 =(r401 ? r384 : r415);
458    |  float r417 = r0.x;
459    |  float r419 = r418.x;
460    |  float r420 = r417-r419;
461    |  float r421 = r0.y;
462    |  float r422 = r418.y;
463    |  float r423 = r421-r422;
464    |  float r424 = r0.z;
465    |  float r425 = r418.z;
466    |  float r426 = r424-r425;
467    |  float r427 = r0.w;
468    |  vec3 r428 = vec3(r420,r423,r426);
469    |  float r429 = length(r428);
470    |  float r431 = r429-r430;
471    |  bool r432 =(r416 == r1);
472    |  float r433 = r431-r416;
473    |  float r434 = r19*r433;
474    |  float r435 = r434/r17;
475    |  float r436 = r19+r435;
476    |  float r437 = max(r436,r24);
477    |  float r438 = min(r437,r25);
478    |  float r439 = r25-r438;
479    |  float r440 = r431*r439;
480    |  float r441 = r416*r438;
481    |  float r442 = r440+r441;
482    |  float r443 = r17*r438;
483    |  float r444 = r25-r438;
484    |  float r445 = r443*r444;
485    |  float r446 = r442-r445;
486    |  float r447 =(r432 ? r431 : r446);
487    |  return r447;
488    |}
489    |vec3 colour(vec4 r0)
490    |{
491    |  /* constants */
492    |  float r1 = 1.0/0.0;
493    |  vec3 r3 = vec3(0.0,0.0,0.0);
494    |  float r15 = 5.0;
495    |  float r17 = rv_smoothness;
496    |  float r19 = 0.5;
497    |  float r24 = 0.0;
498    |  float r25 = 1.0;
499    |  vec3 r38 = vec3(-1.0,-2.0,4.5);
500    |  vec3 r53 = vec3(1.0,-2.0,4.5);
501    |  vec3 r68 = vec3(0.0,0.0,4.5);
502    |  float r81 = 4.0;
503    |  vec3 r131 = vec3(0.0,12.0,0.0);
504    |  float r143 = 10.0;
505    |  vec3 r162 = vec3(0.0,12.0,9.8);
506    |  vec3 r177 = vec3(0.0,10.0,9.6);
507    |  vec3 r192 = vec3(0.0,8.0,9.0);
508    |  vec3 r207 = vec3(-10.0,12.0,0.0);
509    |  float r217 = -1.5707963267948966;
510    |  vec3 r218 = vec3(0.0,1.0,0.0);
511    |  float r265 = 1.5;
512    |  vec3 r313 = vec3(10.0,12.0,0.0);
513    |  float r323 = 1.5707963267948966;
514    |  vec3 r324 = vec3(0.0,1.0,0.0);
515    |  vec3 r418 = vec3(0.0,32.0,0.0);
516    |  float r430 = 15.0;
517    |  float r446 = 0.8;
518    |  vec3 r447 = vec3(r446,r446,r19);
519    |  float r448 = 2.2;
520    |  vec3 r449 = vec3(r448);
521    |  vec3 r450 = pow(r447,r449);
522    |  /* body */
523    |  float r2 = r0.x;
524    |  float r4 = r3.x;
525    |  float r5 = r2-r4;
526    |  float r6 = r0.y;
527    |  float r7 = r3.y;
528    |  float r8 = r6-r7;
529    |  float r9 = r0.z;
530    |  float r10 = r3.z;
531    |  float r11 = r9-r10;
532    |  float r12 = r0.w;
533    |  vec3 r13 = vec3(r5,r8,r11);
534    |  float r14 = length(r13);
535    |  float r16 = r14-r15;
536    |  bool r18 =(r1 == r1);
537    |  float r20 = r16-r1;
538    |  float r21 = r19*r20;
539    |  float r22 = r21/r17;
540    |  float r23 = r19+r22;
541    |  float r26 = max(r23,r24);
542    |  float r27 = min(r26,r25);
543    |  float r28 = r25-r27;
544    |  float r29 = r16*r28;
545    |  float r30 = r1*r27;
546    |  float r31 = r29+r30;
547    |  float r32 = r17*r27;
548    |  float r33 = r25-r27;
549    |  float r34 = r32*r33;
550    |  float r35 = r31-r34;
551    |  float r36 =(r18 ? r16 : r35);
552    |  float r37 = r0.x;
553    |  float r39 = r38.x;
554    |  float r40 = r37-r39;
555    |  float r41 = r0.y;
556    |  float r42 = r38.y;
557    |  float r43 = r41-r42;
558    |  float r44 = r0.z;
559    |  float r45 = r38.z;
560    |  float r46 = r44-r45;
561    |  float r47 = r0.w;
562    |  vec3 r48 = vec3(r40,r43,r46);
563    |  float r49 = length(r48);
564    |  float r50 = r49-r19;
565    |  float r51 = min(r36,r50);
566    |  float r52 = r0.x;
567    |  float r54 = r53.x;
568    |  float r55 = r52-r54;
569    |  float r56 = r0.y;
570    |  float r57 = r53.y;
571    |  float r58 = r56-r57;
572    |  float r59 = r0.z;
573    |  float r60 = r53.z;
574    |  float r61 = r59-r60;
575    |  float r62 = r0.w;
576    |  vec3 r63 = vec3(r55,r58,r61);
577    |  float r64 = length(r63);
578    |  float r65 = r64-r19;
579    |  float r66 = min(r51,r65);
580    |  float r67 = r0.x;
581    |  float r69 = r68.x;
582    |  float r70 = r67-r69;
583    |  float r71 = r0.y;
584    |  float r72 = r68.y;
585    |  float r73 = r71-r72;
586    |  float r74 = r0.z;
587    |  float r75 = r68.z;
588    |  float r76 = r74-r75;
589    |  float r77 = r0.w;
590    |  vec2 r78 = vec2(r70,r73);
591    |  float r79 = length(r78);
592    |  vec2 r80 = vec2(r79,r76);
593    |  vec2 r82 = vec2(r24,r81);
594    |  vec2 r83 = r80-r82;
595    |  vec2 r84 = vec2(r81,r19);
596    |  float r85 = length(r84);
597    |  vec2 r86 = vec2(r85);
598    |  vec2 r87 = r84/r86;
599    |  float r88 = dot(r83,r87);
600    |  float r89 = r87.y;
601    |  float r90 = r87.x;
602    |  float r91 = -(r90);
603    |  vec2 r92 = vec2(r89,r91);
604    |  float r93 = dot(r83,r92);
605    |  float r94 = r80.y;
606    |  float r95 = -(r94);
607    |  float r96 = max(r88,r95);
608    |  float r97=r96;
609    |  float r98 = r80.y;
610    |  bool r99 = r98>r81;
611    |  bool r100 = r93<r24;
612    |  bool r101 =(r99 && r100);
613    |  if (r101) {
614    |  float r102 = length(r83);
615    |  float r103 = max(r97,r102);
616    |  r97=r103;
617    |  }
618    |  float r104 = r80.x;
619    |  bool r105 = r104>r19;
620    |  vec2 r106 = vec2(r81,r19);
621    |  float r107 = length(r106);
622    |  bool r108 = r93>r107;
623    |  bool r109 =(r105 && r108);
624    |  if (r109) {
625    |  vec2 r110 = vec2(r19,r24);
626    |  vec2 r111 = r80-r110;
627    |  float r112 = length(r111);
628    |  float r113 = max(r97,r112);
629    |  r97=r113;
630    |  }
631    |  bool r114 =(r66 == r1);
632    |  float r115 = r97-r66;
633    |  float r116 = r19*r115;
634    |  float r117 = r116/r17;
635    |  float r118 = r19+r117;
636    |  float r119 = max(r118,r24);
637    |  float r120 = min(r119,r25);
638    |  float r121 = r25-r120;
639    |  float r122 = r97*r121;
640    |  float r123 = r66*r120;
641    |  float r124 = r122+r123;
642    |  float r125 = r17*r120;
643    |  float r126 = r25-r120;
644    |  float r127 = r125*r126;
645    |  float r128 = r124-r127;
646    |  float r129 =(r114 ? r97 : r128);
647    |  float r130 = r0.x;
648    |  float r132 = r131.x;
649    |  float r133 = r130-r132;
650    |  float r134 = r0.y;
651    |  float r135 = r131.y;
652    |  float r136 = r134-r135;
653    |  float r137 = r0.z;
654    |  float r138 = r131.z;
655    |  float r139 = r137-r138;
656    |  float r140 = r0.w;
657    |  vec3 r141 = vec3(r133,r136,r139);
658    |  float r142 = length(r141);
659    |  float r144 = r142-r143;
660    |  bool r145 =(r129 == r1);
661    |  float r146 = r144-r129;
662    |  float r147 = r19*r146;
663    |  float r148 = r147/r17;
664    |  float r149 = r19+r148;
665    |  float r150 = max(r149,r24);
666    |  float r151 = min(r150,r25);
667    |  float r152 = r25-r151;
668    |  float r153 = r144*r152;
669    |  float r154 = r129*r151;
670    |  float r155 = r153+r154;
671    |  float r156 = r17*r151;
672    |  float r157 = r25-r151;
673    |  float r158 = r156*r157;
674    |  float r159 = r155-r158;
675    |  float r160 =(r145 ? r144 : r159);
676    |  float r161 = r0.x;
677    |  float r163 = r162.x;
678    |  float r164 = r161-r163;
679    |  float r165 = r0.y;
680    |  float r166 = r162.y;
681    |  float r167 = r165-r166;
682    |  float r168 = r0.z;
683    |  float r169 = r162.z;
684    |  float r170 = r168-r169;
685    |  float r171 = r0.w;
686    |  vec3 r172 = vec3(r164,r167,r170);
687    |  float r173 = length(r172);
688    |  float r174 = r173-r19;
689    |  float r175 = min(r160,r174);
690    |  float r176 = r0.x;
691    |  float r178 = r177.x;
692    |  float r179 = r176-r178;
693    |  float r180 = r0.y;
694    |  float r181 = r177.y;
695    |  float r182 = r180-r181;
696    |  float r183 = r0.z;
697    |  float r184 = r177.z;
698    |  float r185 = r183-r184;
699    |  float r186 = r0.w;
700    |  vec3 r187 = vec3(r179,r182,r185);
701    |  float r188 = length(r187);
702    |  float r189 = r188-r19;
703    |  float r190 = min(r175,r189);
704    |  float r191 = r0.x;
705    |  float r193 = r192.x;
706    |  float r194 = r191-r193;
707    |  float r195 = r0.y;
708    |  float r196 = r192.y;
709    |  float r197 = r195-r196;
710    |  float r198 = r0.z;
711    |  float r199 = r192.z;
712    |  float r200 = r198-r199;
713    |  float r201 = r0.w;
714    |  vec3 r202 = vec3(r194,r197,r200);
715    |  float r203 = length(r202);
716    |  float r204 = r203-r19;
717    |  float r205 = min(r190,r204);
718    |  float r206 = r0.x;
719    |  float r208 = r207.x;
720    |  float r209 = r206-r208;
721    |  float r210 = r0.y;
722    |  float r211 = r207.y;
723    |  float r212 = r210-r211;
724    |  float r213 = r0.z;
725    |  float r214 = r207.z;
726    |  float r215 = r213-r214;
727    |  float r216 = r0.w;
728    |  vec3 r219 = vec3(r209,r212,r215);
729    |  float r220 = cos(r217);
730    |  vec3 r221 = vec3(r220);
731    |  vec3 r222 = r219*r221;
732    |  float r223 = r218.y;
733    |  float r224 = r219.z;
734    |  float r225 = r223*r224;
735    |  float r226 = r218.z;
736    |  float r227 = r219.y;
737    |  float r228 = r226*r227;
738    |  float r229 = r225-r228;
739    |  float r230 = r218.z;
740    |  float r231 = r219.x;
741    |  float r232 = r230*r231;
742    |  float r233 = r218.x;
743    |  float r234 = r219.z;
744    |  float r235 = r233*r234;
745    |  float r236 = r232-r235;
746    |  float r237 = r218.x;
747    |  float r238 = r219.y;
748    |  float r239 = r237*r238;
749    |  float r240 = r218.y;
750    |  float r241 = r219.x;
751    |  float r242 = r240*r241;
752    |  float r243 = r239-r242;
753    |  vec3 r244 = vec3(r229,r236,r243);
754    |  float r245 = sin(r217);
755    |  vec3 r246 = vec3(r245);
756    |  vec3 r247 = r244*r246;
757    |  vec3 r248 = r222-r247;
758    |  float r249 = cos(r217);
759    |  float r250 = r25-r249;
760    |  vec3 r251 = vec3(r250);
761    |  vec3 r252 = r219*r251;
762    |  float r253 = dot(r218,r252);
763    |  vec3 r254 = vec3(r253);
764    |  vec3 r255 = r218*r254;
765    |  vec3 r256 = r248+r255;
766    |  float r257 = r256.x;
767    |  float r258 = r256.y;
768    |  float r259 = r256.z;
769    |  vec2 r260 = vec2(r257,r258);
770    |  float r261 = length(r260);
771    |  vec2 r262 = vec2(r261,r259);
772    |  vec2 r263 = vec2(r24,r143);
773    |  vec2 r264 = r262-r263;
774    |  vec2 r266 = vec2(r143,r265);
775    |  float r267 = length(r266);
776    |  vec2 r268 = vec2(r267);
777    |  vec2 r269 = r266/r268;
778    |  float r270 = dot(r264,r269);
779    |  float r271 = r269.y;
780    |  float r272 = r269.x;
781    |  float r273 = -(r272);
782    |  vec2 r274 = vec2(r271,r273);
783    |  float r275 = dot(r264,r274);
784    |  float r276 = r262.y;
785    |  float r277 = -(r276);
786    |  float r278 = max(r270,r277);
787    |  float r279=r278;
788    |  float r280 = r262.y;
789    |  bool r281 = r280>r143;
790    |  bool r282 = r275<r24;
791    |  bool r283 =(r281 && r282);
792    |  if (r283) {
793    |  float r284 = length(r264);
794    |  float r285 = max(r279,r284);
795    |  r279=r285;
796    |  }
797    |  float r286 = r262.x;
798    |  bool r287 = r286>r265;
799    |  vec2 r288 = vec2(r143,r265);
800    |  float r289 = length(r288);
801    |  bool r290 = r275>r289;
802    |  bool r291 =(r287 && r290);
803    |  if (r291) {
804    |  vec2 r292 = vec2(r265,r24);
805    |  vec2 r293 = r262-r292;
806    |  float r294 = length(r293);
807    |  float r295 = max(r279,r294);
808    |  r279=r295;
809    |  }
810    |  bool r296 =(r205 == r1);
811    |  float r297 = r279-r205;
812    |  float r298 = r19*r297;
813    |  float r299 = r298/r17;
814    |  float r300 = r19+r299;
815    |  float r301 = max(r300,r24);
816    |  float r302 = min(r301,r25);
817    |  float r303 = r25-r302;
818    |  float r304 = r279*r303;
819    |  float r305 = r205*r302;
820    |  float r306 = r304+r305;
821    |  float r307 = r17*r302;
822    |  float r308 = r25-r302;
823    |  float r309 = r307*r308;
824    |  float r310 = r306-r309;
825    |  float r311 =(r296 ? r279 : r310);
826    |  float r312 = r0.x;
827    |  float r314 = r313.x;
828    |  float r315 = r312-r314;
829    |  float r316 = r0.y;
830    |  float r317 = r313.y;
831    |  float r318 = r316-r317;
832    |  float r319 = r0.z;
833    |  float r320 = r313.z;
834    |  float r321 = r319-r320;
835    |  float r322 = r0.w;
836    |  vec3 r325 = vec3(r315,r318,r321);
837    |  float r326 = cos(r323);
838    |  vec3 r327 = vec3(r326);
839    |  vec3 r328 = r325*r327;
840    |  float r329 = r324.y;
841    |  float r330 = r325.z;
842    |  float r331 = r329*r330;
843    |  float r332 = r324.z;
844    |  float r333 = r325.y;
845    |  float r334 = r332*r333;
846    |  float r335 = r331-r334;
847    |  float r336 = r324.z;
848    |  float r337 = r325.x;
849    |  float r338 = r336*r337;
850    |  float r339 = r324.x;
851    |  float r340 = r325.z;
852    |  float r341 = r339*r340;
853    |  float r342 = r338-r341;
854    |  float r343 = r324.x;
855    |  float r344 = r325.y;
856    |  float r345 = r343*r344;
857    |  float r346 = r324.y;
858    |  float r347 = r325.x;
859    |  float r348 = r346*r347;
860    |  float r349 = r345-r348;
861    |  vec3 r350 = vec3(r335,r342,r349);
862    |  float r351 = sin(r323);
863    |  vec3 r352 = vec3(r351);
864    |  vec3 r353 = r350*r352;
865    |  vec3 r354 = r328-r353;
866    |  float r355 = cos(r323);
867    |  float r356 = r25-r355;
868    |  vec3 r357 = vec3(r356);
869    |  vec3 r358 = r325*r357;
870    |  float r359 = dot(r324,r358);
871    |  vec3 r360 = vec3(r359);
872    |  vec3 r361 = r324*r360;
873    |  vec3 r362 = r354+r361;
874    |  float r363 = r362.x;
875    |  float r364 = r362.y;
876    |  float r365 = r362.z;
877    |  vec2 r366 = vec2(r363,r364);
878    |  float r367 = length(r366);
879    |  vec2 r368 = vec2(r367,r365);
880    |  vec2 r369 = vec2(r24,r143);
881    |  vec2 r370 = r368-r369;
882    |  vec2 r371 = vec2(r143,r265);
883    |  float r372 = length(r371);
884    |  vec2 r373 = vec2(r372);
885    |  vec2 r374 = r371/r373;
886    |  float r375 = dot(r370,r374);
887    |  float r376 = r374.y;
888    |  float r377 = r374.x;
889    |  float r378 = -(r377);
890    |  vec2 r379 = vec2(r376,r378);
891    |  float r380 = dot(r370,r379);
892    |  float r381 = r368.y;
893    |  float r382 = -(r381);
894    |  float r383 = max(r375,r382);
895    |  float r384=r383;
896    |  float r385 = r368.y;
897    |  bool r386 = r385>r143;
898    |  bool r387 = r380<r24;
899    |  bool r388 =(r386 && r387);
900    |  if (r388) {
901    |  float r389 = length(r370);
902    |  float r390 = max(r384,r389);
903    |  r384=r390;
904    |  }
905    |  float r391 = r368.x;
906    |  bool r392 = r391>r265;
907    |  vec2 r393 = vec2(r143,r265);
908    |  float r394 = length(r393);
909    |  bool r395 = r380>r394;
910    |  bool r396 =(r392 && r395);
911    |  if (r396) {
912    |  vec2 r397 = vec2(r265,r24);
913    |  vec2 r398 = r368-r397;
914    |  float r399 = length(r398);
915    |  float r400 = max(r384,r399);
916    |  r384=r400;
917    |  }
918    |  bool r401 =(r311 == r1);
919    |  float r402 = r384-r311;
920    |  float r403 = r19*r402;
921    |  float r404 = r403/r17;
922    |  float r405 = r19+r404;
923    |  float r406 = max(r405,r24);
924    |  float r407 = min(r406,r25);
925    |  float r408 = r25-r407;
926    |  float r409 = r384*r408;
927    |  float r410 = r311*r407;
928    |  float r411 = r409+r410;
929    |  float r412 = r17*r407;
930    |  float r413 = r25-r407;
931    |  float r414 = r412*r413;
932    |  float r415 = r411-r414;
933    |  float r416 =(r401 ? r384 : r415);
934    |  float r417 = r0.x;
935    |  float r419 = r418.x;
936    |  float r420 = r417-r419;
937    |  float r421 = r0.y;
938    |  float r422 = r418.y;
939    |  float r423 = r421-r422;
940    |  float r424 = r0.z;
941    |  float r425 = r418.z;
942    |  float r426 = r424-r425;
943    |  float r427 = r0.w;
944    |  vec3 r428 = vec3(r420,r423,r426);
945    |  float r429 = length(r428);
946    |  float r431 = r429-r430;
947    |  bool r432 = r431<=r24;
948    |  bool r433 = r431<=r416;
949    |  bool r434 =(r432 || r433);
950    |  float r435 = r0.x;
951    |  float r436 = r418.x;
952    |  float r437 = r435-r436;
953    |  float r438 = r0.y;
954    |  float r439 = r418.y;
955    |  float r440 = r438-r439;
956    |  float r441 = r0.z;
957    |  float r442 = r418.z;
958    |  float r443 = r441-r442;
959    |  float r444 = r0.w;
960    |  vec4 r445 = vec4(r437,r440,r443,r444);
961    |  float r451 = r0.x;
962    |  float r452 = r3.x;
963    |  float r453 = r451-r452;
964    |  float r454 = r0.y;
965    |  float r455 = r3.y;
966    |  float r456 = r454-r455;
967    |  float r457 = r0.z;
968    |  float r458 = r3.z;
969    |  float r459 = r457-r458;
970    |  float r460 = r0.w;
971    |  vec3 r461 = vec3(r453,r456,r459);
972    |  float r462 = length(r461);
973    |  float r463 = r462-r15;
974    |  bool r464 =(r1 == r1);
975    |  float r465 = r463-r1;
976    |  float r466 = r19*r465;
977    |  float r467 = r466/r17;
978    |  float r468 = r19+r467;
979    |  float r469 = max(r468,r24);
980    |  float r470 = min(r469,r25);
981    |  float r471 = r25-r470;
982    |  float r472 = r463*r471;
983    |  float r473 = r1*r470;
984    |  float r474 = r472+r473;
985    |  float r475 = r17*r470;
986    |  float r476 = r25-r470;
987    |  float r477 = r475*r476;
988    |  float r478 = r474-r477;
989    |  float r479 =(r464 ? r463 : r478);
990    |  float r480 = r0.x;
991    |  float r481 = r38.x;
992    |  float r482 = r480-r481;
993    |  float r483 = r0.y;
994    |  float r484 = r38.y;
995    |  float r485 = r483-r484;
996    |  float r486 = r0.z;
997    |  float r487 = r38.z;
998    |  float r488 = r486-r487;
999    |  float r489 = r0.w;
1000    |  vec3 r490 = vec3(r482,r485,r488);
1001    |  float r491 = length(r490);
1002    |  float r492 = r491-r19;
1003    |  float r493 = min(r479,r492);
1004    |  float r494 = r0.x;
1005    |  float r495 = r53.x;
1006    |  float r496 = r494-r495;
1007    |  float r497 = r0.y;
1008    |  float r498 = r53.y;
1009    |  float r499 = r497-r498;
1010    |  float r500 = r0.z;
1011    |  float r501 = r53.z;
1012    |  float r502 = r500-r501;
1013    |  float r503 = r0.w;
1014    |  vec3 r504 = vec3(r496,r499,r502);
1015    |  float r505 = length(r504);
1016    |  float r506 = r505-r19;
1017    |  float r507 = min(r493,r506);
1018    |  float r508 = r0.x;
1019    |  float r509 = r68.x;
1020    |  float r510 = r508-r509;
1021    |  float r511 = r0.y;
1022    |  float r512 = r68.y;
1023    |  float r513 = r511-r512;
1024    |  float r514 = r0.z;
1025    |  float r515 = r68.z;
1026    |  float r516 = r514-r515;
1027    |  float r517 = r0.w;
1028    |  vec2 r518 = vec2(r510,r513);
1029    |  float r519 = length(r518);
1030    |  vec2 r520 = vec2(r519,r516);
1031    |  vec2 r521 = vec2(r24,r81);
1032    |  vec2 r522 = r520-r521;
1033    |  vec2 r523 = vec2(r81,r19);
1034    |  float r524 = length(r523);
1035    |  vec2 r525 = vec2(r524);
1036    |  vec2 r526 = r523/r525;
1037    |  float r527 = dot(r522,r526);
1038    |  float r528 = r526.y;
1039    |  float r529 = r526.x;
1040    |  float r530 = -(r529);
1041    |  vec2 r531 = vec2(r528,r530);
1042    |  float r532 = dot(r522,r531);
1043    |  float r533 = r520.y;
1044    |  float r534 = -(r533);
1045    |  float r535 = max(r527,r534);
1046    |  float r536=r535;
1047    |  float r537 = r520.y;
1048    |  bool r538 = r537>r81;
1049    |  bool r539 = r532<r24;
1050    |  bool r540 =(r538 && r539);
1051    |  if (r540) {
1052    |  float r541 = length(r522);
1053    |  float r542 = max(r536,r541);
1054    |  r536=r542;
1055    |  }
1056    |  float r543 = r520.x;
1057    |  bool r544 = r543>r19;
1058    |  vec2 r545 = vec2(r81,r19);
1059    |  float r546 = length(r545);
1060    |  bool r547 = r532>r546;
1061    |  bool r548 =(r544 && r547);
1062    |  if (r548) {
1063    |  vec2 r549 = vec2(r19,r24);
1064    |  vec2 r550 = r520-r549;
1065    |  float r551 = length(r550);
1066    |  float r552 = max(r536,r551);
1067    |  r536=r552;
1068    |  }
1069    |  bool r553 =(r507 == r1);
1070    |  float r554 = r536-r507;
1071    |  float r555 = r19*r554;
1072    |  float r556 = r555/r17;
1073    |  float r557 = r19+r556;
1074    |  float r558 = max(r557,r24);
1075    |  float r559 = min(r558,r25);
1076    |  float r560 = r25-r559;
1077    |  float r561 = r536*r560;
1078    |  float r562 = r507*r559;
1079    |  float r563 = r561+r562;
1080    |  float r564 = r17*r559;
1081    |  float r565 = r25-r559;
1082    |  float r566 = r564*r565;
1083    |  float r567 = r563-r566;
1084    |  float r568 =(r553 ? r536 : r567);
1085    |  float r569 = r0.x;
1086    |  float r570 = r131.x;
1087    |  float r571 = r569-r570;
1088    |  float r572 = r0.y;
1089    |  float r573 = r131.y;
1090    |  float r574 = r572-r573;
1091    |  float r575 = r0.z;
1092    |  float r576 = r131.z;
1093    |  float r577 = r575-r576;
1094    |  float r578 = r0.w;
1095    |  vec3 r579 = vec3(r571,r574,r577);
1096    |  float r580 = length(r579);
1097    |  float r581 = r580-r143;
1098    |  bool r582 =(r568 == r1);
1099    |  float r583 = r581-r568;
1100    |  float r584 = r19*r583;
1101    |  float r585 = r584/r17;
1102    |  float r586 = r19+r585;
1103    |  float r587 = max(r586,r24);
1104    |  float r588 = min(r587,r25);
1105    |  float r589 = r25-r588;
1106    |  float r590 = r581*r589;
1107    |  float r591 = r568*r588;
1108    |  float r592 = r590+r591;
1109    |  float r593 = r17*r588;
1110    |  float r594 = r25-r588;
1111    |  float r595 = r593*r594;
1112    |  float r596 = r592-r595;
1113    |  float r597 =(r582 ? r581 : r596);
1114    |  float r598 = r0.x;
1115    |  float r599 = r162.x;
1116    |  float r600 = r598-r599;
1117    |  float r601 = r0.y;
1118    |  float r602 = r162.y;
1119    |  float r603 = r601-r602;
1120    |  float r604 = r0.z;
1121    |  float r605 = r162.z;
1122    |  float r606 = r604-r605;
1123    |  float r607 = r0.w;
1124    |  vec3 r608 = vec3(r600,r603,r606);
1125    |  float r609 = length(r608);
1126    |  float r610 = r609-r19;
1127    |  float r611 = min(r597,r610);
1128    |  float r612 = r0.x;
1129    |  float r613 = r177.x;
1130    |  float r614 = r612-r613;
1131    |  float r615 = r0.y;
1132    |  float r616 = r177.y;
1133    |  float r617 = r615-r616;
1134    |  float r618 = r0.z;
1135    |  float r619 = r177.z;
1136    |  float r620 = r618-r619;
1137    |  float r621 = r0.w;
1138    |  vec3 r622 = vec3(r614,r617,r620);
1139    |  float r623 = length(r622);
1140    |  float r624 = r623-r19;
1141    |  float r625 = min(r611,r624);
1142    |  float r626 = r0.x;
1143    |  float r627 = r192.x;
1144    |  float r628 = r626-r627;
1145    |  float r629 = r0.y;
1146    |  float r630 = r192.y;
1147    |  float r631 = r629-r630;
1148    |  float r632 = r0.z;
1149    |  float r633 = r192.z;
1150    |  float r634 = r632-r633;
1151    |  float r635 = r0.w;
1152    |  vec3 r636 = vec3(r628,r631,r634);
1153    |  float r637 = length(r636);
1154    |  float r638 = r637-r19;
1155    |  float r639 = min(r625,r638);
1156    |  float r640 = r0.x;
1157    |  float r641 = r207.x;
1158    |  float r642 = r640-r641;
1159    |  float r643 = r0.y;
1160    |  float r644 = r207.y;
1161    |  float r645 = r643-r644;
1162    |  float r646 = r0.z;
1163    |  float r647 = r207.z;
1164    |  float r648 = r646-r647;
1165    |  float r649 = r0.w;
1166    |  vec3 r650 = vec3(r642,r645,r648);
1167    |  float r651 = cos(r217);
1168    |  vec3 r652 = vec3(r651);
1169    |  vec3 r653 = r650*r652;
1170    |  float r654 = r218.y;
1171    |  float r655 = r650.z;
1172    |  float r656 = r654*r655;
1173    |  float r657 = r218.z;
1174    |  float r658 = r650.y;
1175    |  float r659 = r657*r658;
1176    |  float r660 = r656-r659;
1177    |  float r661 = r218.z;
1178    |  float r662 = r650.x;
1179    |  float r663 = r661*r662;
1180    |  float r664 = r218.x;
1181    |  float r665 = r650.z;
1182    |  float r666 = r664*r665;
1183    |  float r667 = r663-r666;
1184    |  float r668 = r218.x;
1185    |  float r669 = r650.y;
1186    |  float r670 = r668*r669;
1187    |  float r671 = r218.y;
1188    |  float r672 = r650.x;
1189    |  float r673 = r671*r672;
1190    |  float r674 = r670-r673;
1191    |  vec3 r675 = vec3(r660,r667,r674);
1192    |  float r676 = sin(r217);
1193    |  vec3 r677 = vec3(r676);
1194    |  vec3 r678 = r675*r677;
1195    |  vec3 r679 = r653-r678;
1196    |  float r680 = cos(r217);
1197    |  float r681 = r25-r680;
1198    |  vec3 r682 = vec3(r681);
1199    |  vec3 r683 = r650*r682;
1200    |  float r684 = dot(r218,r683);
1201    |  vec3 r685 = vec3(r684);
1202    |  vec3 r686 = r218*r685;
1203    |  vec3 r687 = r679+r686;
1204    |  float r688 = r687.x;
1205    |  float r689 = r687.y;
1206    |  float r690 = r687.z;
1207    |  vec2 r691 = vec2(r688,r689);
1208    |  float r692 = length(r691);
1209    |  vec2 r693 = vec2(r692,r690);
1210    |  vec2 r694 = vec2(r24,r143);
1211    |  vec2 r695 = r693-r694;
1212    |  vec2 r696 = vec2(r143,r265);
1213    |  float r697 = length(r696);
1214    |  vec2 r698 = vec2(r697);
1215    |  vec2 r699 = r696/r698;
1216    |  float r700 = dot(r695,r699);
1217    |  float r701 = r699.y;
1218    |  float r702 = r699.x;
1219    |  float r703 = -(r702);
1220    |  vec2 r704 = vec2(r701,r703);
1221    |  float r705 = dot(r695,r704);
1222    |  float r706 = r693.y;
1223    |  float r707 = -(r706);
1224    |  float r708 = max(r700,r707);
1225    |  float r709=r708;
1226    |  float r710 = r693.y;
1227    |  bool r711 = r710>r143;
1228    |  bool r712 = r705<r24;
1229    |  bool r713 =(r711 && r712);
1230    |  if (r713) {
1231    |  float r714 = length(r695);
1232    |  float r715 = max(r709,r714);
1233    |  r709=r715;
1234    |  }
1235    |  float r716 = r693.x;
1236    |  bool r717 = r716>r265;
1237    |  vec2 r718 = vec2(r143,r265);
1238    |  float r719 = length(r718);
1239    |  bool r720 = r705>r719;
1240    |  bool r721 =(r717 && r720);
1241    |  if (r721) {
1242    |  vec2 r722 = vec2(r265,r24);
1243    |  vec2 r723 = r693-r722;
1244    |  float r724 = length(r723);
1245    |  float r725 = max(r709,r724);
1246    |  r709=r725;
1247    |  }
1248    |  bool r726 =(r639 == r1);
1249    |  float r727 = r709-r639;
1250    |  float r728 = r19*r727;
1251    |  float r729 = r728/r17;
1252    |  float r730 = r19+r729;
1253    |  float r731 = max(r730,r24);
1254    |  float r732 = min(r731,r25);
1255    |  float r733 = r25-r732;
1256    |  float r734 = r709*r733;
1257    |  float r735 = r639*r732;
1258    |  float r736 = r734+r735;
1259    |  float r737 = r17*r732;
1260    |  float r738 = r25-r732;
1261    |  float r739 = r737*r738;
1262    |  float r740 = r736-r739;
1263    |  float r741 =(r726 ? r709 : r740);
1264    |  float r742 = r0.x;
1265    |  float r743 = r313.x;
1266    |  float r744 = r742-r743;
1267    |  float r745 = r0.y;
1268    |  float r746 = r313.y;
1269    |  float r747 = r745-r746;
1270    |  float r748 = r0.z;
1271    |  float r749 = r313.z;
1272    |  float r750 = r748-r749;
1273    |  float r751 = r0.w;
1274    |  vec3 r752 = vec3(r744,r747,r750);
1275    |  float r753 = cos(r323);
1276    |  vec3 r754 = vec3(r753);
1277    |  vec3 r755 = r752*r754;
1278    |  float r756 = r324.y;
1279    |  float r757 = r752.z;
1280    |  float r758 = r756*r757;
1281    |  float r759 = r324.z;
1282    |  float r760 = r752.y;
1283    |  float r761 = r759*r760;
1284    |  float r762 = r758-r761;
1285    |  float r763 = r324.z;
1286    |  float r764 = r752.x;
1287    |  float r765 = r763*r764;
1288    |  float r766 = r324.x;
1289    |  float r767 = r752.z;
1290    |  float r768 = r766*r767;
1291    |  float r769 = r765-r768;
1292    |  float r770 = r324.x;
1293    |  float r771 = r752.y;
1294    |  float r772 = r770*r771;
1295    |  float r773 = r324.y;
1296    |  float r774 = r752.x;
1297    |  float r775 = r773*r774;
1298    |  float r776 = r772-r775;
1299    |  vec3 r777 = vec3(r762,r769,r776);
1300    |  float r778 = sin(r323);
1301    |  vec3 r779 = vec3(r778);
1302    |  vec3 r780 = r777*r779;
1303    |  vec3 r781 = r755-r780;
1304    |  float r782 = cos(r323);
1305    |  float r783 = r25-r782;
1306    |  vec3 r784 = vec3(r783);
1307    |  vec3 r785 = r752*r784;
1308    |  float r786 = dot(r324,r785);
1309    |  vec3 r787 = vec3(r786);
1310    |  vec3 r788 = r324*r787;
1311    |  vec3 r789 = r781+r788;
1312    |  float r790 = r789.x;
1313    |  float r791 = r789.y;
1314    |  float r792 = r789.z;
1315    |  vec2 r793 = vec2(r790,r791);
1316    |  float r794 = length(r793);
1317    |  vec2 r795 = vec2(r794,r792);
1318    |  vec2 r796 = vec2(r24,r143);
1319    |  vec2 r797 = r795-r796;
1320    |  vec2 r798 = vec2(r143,r265);
1321    |  float r799 = length(r798);
1322    |  vec2 r800 = vec2(r799);
1323    |  vec2 r801 = r798/r800;
1324    |  float r802 = dot(r797,r801);
1325    |  float r803 = r801.y;
1326    |  float r804 = r801.x;
1327    |  float r805 = -(r804);
1328    |  vec2 r806 = vec2(r803,r805);
1329    |  float r807 = dot(r797,r806);
1330    |  float r808 = r795.y;
1331    |  float r809 = -(r808);
1332    |  float r810 = max(r802,r809);
1333    |  float r811=r810;
1334    |  float r812 = r795.y;
1335    |  bool r813 = r812>r143;
1336    |  bool r814 = r807<r24;
1337    |  bool r815 =(r813 && r814);
1338    |  if (r815) {
1339    |  float r816 = length(r797);
1340    |  float r817 = max(r811,r816);
1341    |  r811=r817;
1342    |  }
1343    |  float r818 = r795.x;
1344    |  bool r819 = r818>r265;
1345    |  vec2 r820 = vec2(r143,r265);
1346    |  float r821 = length(r820);
1347    |  bool r822 = r807>r821;
1348    |  bool r823 =(r819 && r822);
1349    |  if (r823) {
1350    |  vec2 r824 = vec2(r265,r24);
1351    |  vec2 r825 = r795-r824;
1352    |  float r826 = length(r825);
1353    |  float r827 = max(r811,r826);
1354    |  r811=r827;
1355    |  }
1356    |  bool r828 = r811<=r24;
1357    |  bool r829 = r811<=r741;
1358    |  bool r830 =(r828 || r829);
1359    |  float r831 = r0.x;
1360    |  float r832 = r313.x;
1361    |  float r833 = r831-r832;
1362    |  float r834 = r0.y;
1363    |  float r835 = r313.y;
1364    |  float r836 = r834-r835;
1365    |  float r837 = r0.z;
1366    |  float r838 = r313.z;
1367    |  float r839 = r837-r838;
1368    |  float r840 = r0.w;
1369    |  vec3 r841 = vec3(r833,r836,r839);
1370    |  float r842 = cos(r323);
1371    |  vec3 r843 = vec3(r842);
1372    |  vec3 r844 = r841*r843;
1373    |  float r845 = r324.y;
1374    |  float r846 = r841.z;
1375    |  float r847 = r845*r846;
1376    |  float r848 = r324.z;
1377    |  float r849 = r841.y;
1378    |  float r850 = r848*r849;
1379    |  float r851 = r847-r850;
1380    |  float r852 = r324.z;
1381    |  float r853 = r841.x;
1382    |  float r854 = r852*r853;
1383    |  float r855 = r324.x;
1384    |  float r856 = r841.z;
1385    |  float r857 = r855*r856;
1386    |  float r858 = r854-r857;
1387    |  float r859 = r324.x;
1388    |  float r860 = r841.y;
1389    |  float r861 = r859*r860;
1390    |  float r862 = r324.y;
1391    |  float r863 = r841.x;
1392    |  float r864 = r862*r863;
1393    |  float r865 = r861-r864;
1394    |  vec3 r866 = vec3(r851,r858,r865);
1395    |  float r867 = sin(r323);
1396    |  vec3 r868 = vec3(r867);
1397    |  vec3 r869 = r866*r868;
1398    |  vec3 r870 = r844-r869;
1399    |  float r871 = cos(r323);
1400    |  float r872 = r25-r871;
1401    |  vec3 r873 = vec3(r872);
1402    |  vec3 r874 = r841*r873;
1403    |  float r875 = dot(r324,r874);
1404    |  vec3 r876 = vec3(r875);
1405    |  vec3 r877 = r324*r876;
1406    |  vec3 r878 = r870+r877;
1407    |  float r879 = r878.x;
1408    |  float r880 = r878.y;
1409    |  float r881 = r878.z;
1410    |  vec4 r882 = vec4(r879,r880,r881,r840);
1411    |  float r883 = r0.x;
1412    |  float r884 = r3.x;
1413    |  float r885 = r883-r884;
1414    |  float r886 = r0.y;
1415    |  float r887 = r3.y;
1416    |  float r888 = r886-r887;
1417    |  float r889 = r0.z;
1418    |  float r890 = r3.z;
1419    |  float r891 = r889-r890;
1420    |  float r892 = r0.w;
1421    |  vec3 r893 = vec3(r885,r888,r891);
1422    |  float r894 = length(r893);
1423    |  float r895 = r894-r15;
1424    |  bool r896 =(r1 == r1);
1425    |  float r897 = r895-r1;
1426    |  float r898 = r19*r897;
1427    |  float r899 = r898/r17;
1428    |  float r900 = r19+r899;
1429    |  float r901 = max(r900,r24);
1430    |  float r902 = min(r901,r25);
1431    |  float r903 = r25-r902;
1432    |  float r904 = r895*r903;
1433    |  float r905 = r1*r902;
1434    |  float r906 = r904+r905;
1435    |  float r907 = r17*r902;
1436    |  float r908 = r25-r902;
1437    |  float r909 = r907*r908;
1438    |  float r910 = r906-r909;
1439    |  float r911 =(r896 ? r895 : r910);
1440    |  float r912 = r0.x;
1441    |  float r913 = r38.x;
1442    |  float r914 = r912-r913;
1443    |  float r915 = r0.y;
1444    |  float r916 = r38.y;
1445    |  float r917 = r915-r916;
1446    |  float r918 = r0.z;
1447    |  float r919 = r38.z;
1448    |  float r920 = r918-r919;
1449    |  float r921 = r0.w;
1450    |  vec3 r922 = vec3(r914,r917,r920);
1451    |  float r923 = length(r922);
1452    |  float r924 = r923-r19;
1453    |  float r925 = min(r911,r924);
1454    |  float r926 = r0.x;
1455    |  float r927 = r53.x;
1456    |  float r928 = r926-r927;
1457    |  float r929 = r0.y;
1458    |  float r930 = r53.y;
1459    |  float r931 = r929-r930;
1460    |  float r932 = r0.z;
1461    |  float r933 = r53.z;
1462    |  float r934 = r932-r933;
1463    |  float r935 = r0.w;
1464    |  vec3 r936 = vec3(r928,r931,r934);
1465    |  float r937 = length(r936);
1466    |  float r938 = r937-r19;
1467    |  float r939 = min(r925,r938);
1468    |  float r940 = r0.x;
1469    |  float r941 = r68.x;
1470    |  float r942 = r940-r941;
1471    |  float r943 = r0.y;
1472    |  float r944 = r68.y;
1473    |  float r945 = r943-r944;
1474    |  float r946 = r0.z;
1475    |  float r947 = r68.z;
1476    |  float r948 = r946-r947;
1477    |  float r949 = r0.w;
1478    |  vec2 r950 = vec2(r942,r945);
1479    |  float r951 = length(r950);
1480    |  vec2 r952 = vec2(r951,r948);
1481    |  vec2 r953 = vec2(r24,r81);
1482    |  vec2 r954 = r952-r953;
1483    |  vec2 r955 = vec2(r81,r19);
1484    |  float r956 = length(r955);
1485    |  vec2 r957 = vec2(r956);
1486    |  vec2 r958 = r955/r957;
1487    |  float r959 = dot(r954,r958);
1488    |  float r960 = r958.y;
1489    |  float r961 = r958.x;
1490    |  float r962 = -(r961);
1491    |  vec2 r963 = vec2(r960,r962);
1492    |  float r964 = dot(r954,r963);
1493    |  float r965 = r952.y;
1494    |  float r966 = -(r965);
1495    |  float r967 = max(r959,r966);
1496    |  float r968=r967;
1497    |  float r969 = r952.y;
1498    |  bool r970 = r969>r81;
1499    |  bool r971 = r964<r24;
1500    |  bool r972 =(r970 && r971);
1501    |  if (r972) {
1502    |  float r973 = length(r954);
1503    |  float r974 = max(r968,r973);
1504    |  r968=r974;
1505    |  }
1506    |  float r975 = r952.x;
1507    |  bool r976 = r975>r19;
1508    |  vec2 r977 = vec2(r81,r19);
1509    |  float r978 = length(r977);
1510    |  bool r979 = r964>r978;
1511    |  bool r980 =(r976 && r979);
1512    |  if (r980) {
1513    |  vec2 r981 = vec2(r19,r24);
1514    |  vec2 r982 = r952-r981;
1515    |  float r983 = length(r982);
1516    |  float r984 = max(r968,r983);
1517    |  r968=r984;
1518    |  }
1519    |  bool r985 =(r939 == r1);
1520    |  float r986 = r968-r939;
1521    |  float r987 = r19*r986;
1522    |  float r988 = r987/r17;
1523    |  float r989 = r19+r988;
1524    |  float r990 = max(r989,r24);
1525    |  float r991 = min(r990,r25);
1526    |  float r992 = r25-r991;
1527    |  float r993 = r968*r992;
1528    |  float r994 = r939*r991;
1529    |  float r995 = r993+r994;
1530    |  float r996 = r17*r991;
1531    |  float r997 = r25-r991;
1532    |  float r998 = r996*r997;
1533    |  float r999 = r995-r998;
1534    |  float r1000 =(r985 ? r968 : r999);
1535    |  float r1001 = r0.x;
1536    |  float r1002 = r131.x;
1537    |  float r1003 = r1001-r1002;
1538    |  float r1004 = r0.y;
1539    |  float r1005 = r131.y;
1540    |  float r1006 = r1004-r1005;
1541    |  float r1007 = r0.z;
1542    |  float r1008 = r131.z;
1543    |  float r1009 = r1007-r1008;
1544    |  float r1010 = r0.w;
1545    |  vec3 r1011 = vec3(r1003,r1006,r1009);
1546    |  float r1012 = length(r1011);
1547    |  float r1013 = r1012-r143;
1548    |  bool r1014 =(r1000 == r1);
1549    |  float r1015 = r1013-r1000;
1550    |  float r1016 = r19*r1015;
1551    |  float r1017 = r1016/r17;
1552    |  float r1018 = r19+r1017;
1553    |  float r1019 = max(r1018,r24);
1554    |  float r1020 = min(r1019,r25);
1555    |  float r1021 = r25-r1020;
1556    |  float r1022 = r1013*r1021;
1557    |  float r1023 = r1000*r1020;
1558    |  float r1024 = r1022+r1023;
1559    |  float r1025 = r17*r1020;
1560    |  float r1026 = r25-r1020;
1561    |  float r1027 = r1025*r1026;
1562    |  float r1028 = r1024-r1027;
1563    |  float r1029 =(r1014 ? r1013 : r1028);
1564    |  float r1030 = r0.x;
1565    |  float r1031 = r162.x;
1566    |  float r1032 = r1030-r1031;
1567    |  float r1033 = r0.y;
1568    |  float r1034 = r162.y;
1569    |  float r1035 = r1033-r1034;
1570    |  float r1036 = r0.z;
1571    |  float r1037 = r162.z;
1572    |  float r1038 = r1036-r1037;
1573    |  float r1039 = r0.w;
1574    |  vec3 r1040 = vec3(r1032,r1035,r1038);
1575    |  float r1041 = length(r1040);
1576    |  float r1042 = r1041-r19;
1577    |  float r1043 = min(r1029,r1042);
1578    |  float r1044 = r0.x;
1579    |  float r1045 = r177.x;
1580    |  float r1046 = r1044-r1045;
1581    |  float r1047 = r0.y;
1582    |  float r1048 = r177.y;
1583    |  float r1049 = r1047-r1048;
1584    |  float r1050 = r0.z;
1585    |  float r1051 = r177.z;
1586    |  float r1052 = r1050-r1051;
1587    |  float r1053 = r0.w;
1588    |  vec3 r1054 = vec3(r1046,r1049,r1052);
1589    |  float r1055 = length(r1054);
1590    |  float r1056 = r1055-r19;
1591    |  float r1057 = min(r1043,r1056);
1592    |  float r1058 = r0.x;
1593    |  float r1059 = r192.x;
1594    |  float r1060 = r1058-r1059;
1595    |  float r1061 = r0.y;
1596    |  float r1062 = r192.y;
1597    |  float r1063 = r1061-r1062;
1598    |  float r1064 = r0.z;
1599    |  float r1065 = r192.z;
1600    |  float r1066 = r1064-r1065;
1601    |  float r1067 = r0.w;
1602    |  vec3 r1068 = vec3(r1060,r1063,r1066);
1603    |  float r1069 = length(r1068);
1604    |  float r1070 = r1069-r19;
1605    |  float r1071 = min(r1057,r1070);
1606    |  float r1072 = r0.x;
1607    |  float r1073 = r207.x;
1608    |  float r1074 = r1072-r1073;
1609    |  float r1075 = r0.y;
1610    |  float r1076 = r207.y;
1611    |  float r1077 = r1075-r1076;
1612    |  float r1078 = r0.z;
1613    |  float r1079 = r207.z;
1614    |  float r1080 = r1078-r1079;
1615    |  float r1081 = r0.w;
1616    |  vec3 r1082 = vec3(r1074,r1077,r1080);
1617    |  float r1083 = cos(r217);
1618    |  vec3 r1084 = vec3(r1083);
1619    |  vec3 r1085 = r1082*r1084;
1620    |  float r1086 = r218.y;
1621    |  float r1087 = r1082.z;
1622    |  float r1088 = r1086*r1087;
1623    |  float r1089 = r218.z;
1624    |  float r1090 = r1082.y;
1625    |  float r1091 = r1089*r1090;
1626    |  float r1092 = r1088-r1091;
1627    |  float r1093 = r218.z;
1628    |  float r1094 = r1082.x;
1629    |  float r1095 = r1093*r1094;
1630    |  float r1096 = r218.x;
1631    |  float r1097 = r1082.z;
1632    |  float r1098 = r1096*r1097;
1633    |  float r1099 = r1095-r1098;
1634    |  float r1100 = r218.x;
1635    |  float r1101 = r1082.y;
1636    |  float r1102 = r1100*r1101;
1637    |  float r1103 = r218.y;
1638    |  float r1104 = r1082.x;
1639    |  float r1105 = r1103*r1104;
1640    |  float r1106 = r1102-r1105;
1641    |  vec3 r1107 = vec3(r1092,r1099,r1106);
1642    |  float r1108 = sin(r217);
1643    |  vec3 r1109 = vec3(r1108);
1644    |  vec3 r1110 = r1107*r1109;
1645    |  vec3 r1111 = r1085-r1110;
1646    |  float r1112 = cos(r217);
1647    |  float r1113 = r25-r1112;
1648    |  vec3 r1114 = vec3(r1113);
1649    |  vec3 r1115 = r1082*r1114;
1650    |  float r1116 = dot(r218,r1115);
1651    |  vec3 r1117 = vec3(r1116);
1652    |  vec3 r1118 = r218*r1117;
1653    |  vec3 r1119 = r1111+r1118;
1654    |  float r1120 = r1119.x;
1655    |  float r1121 = r1119.y;
1656    |  float r1122 = r1119.z;
1657    |  vec2 r1123 = vec2(r1120,r1121);
1658    |  float r1124 = length(r1123);
1659    |  vec2 r1125 = vec2(r1124,r1122);
1660    |  vec2 r1126 = vec2(r24,r143);
1661    |  vec2 r1127 = r1125-r1126;
1662    |  vec2 r1128 = vec2(r143,r265);
1663    |  float r1129 = length(r1128);
1664    |  vec2 r1130 = vec2(r1129);
1665    |  vec2 r1131 = r1128/r1130;
1666    |  float r1132 = dot(r1127,r1131);
1667    |  float r1133 = r1131.y;
1668    |  float r1134 = r1131.x;
1669    |  float r1135 = -(r1134);
1670    |  vec2 r1136 = vec2(r1133,r1135);
1671    |  float r1137 = dot(r1127,r1136);
1672    |  float r1138 = r1125.y;
1673    |  float r1139 = -(r1138);
1674    |  float r1140 = max(r1132,r1139);
1675    |  float r1141=r1140;
1676    |  float r1142 = r1125.y;
1677    |  bool r1143 = r1142>r143;
1678    |  bool r1144 = r1137<r24;
1679    |  bool r1145 =(r1143 && r1144);
1680    |  if (r1145) {
1681    |  float r1146 = length(r1127);
1682    |  float r1147 = max(r1141,r1146);
1683    |  r1141=r1147;
1684    |  }
1685    |  float r1148 = r1125.x;
1686    |  bool r1149 = r1148>r265;
1687    |  vec2 r1150 = vec2(r143,r265);
1688    |  float r1151 = length(r1150);
1689    |  bool r1152 = r1137>r1151;
1690    |  bool r1153 =(r1149 && r1152);
1691    |  if (r1153) {
1692    |  vec2 r1154 = vec2(r265,r24);
1693    |  vec2 r1155 = r1125-r1154;
1694    |  float r1156 = length(r1155);
1695    |  float r1157 = max(r1141,r1156);
1696    |  r1141=r1157;
1697    |  }
1698    |  bool r1158 = r1141<=r24;
1699    |  bool r1159 = r1141<=r1071;
1700    |  bool r1160 =(r1158 || r1159);
1701    |  float r1161 = r0.x;
1702    |  float r1162 = r207.x;
1703    |  float r1163 = r1161-r1162;
1704    |  float r1164 = r0.y;
1705    |  float r1165 = r207.y;
1706    |  float r1166 = r1164-r1165;
1707    |  float r1167 = r0.z;
1708    |  float r1168 = r207.z;
1709    |  float r1169 = r1167-r1168;
1710    |  float r1170 = r0.w;
1711    |  vec3 r1171 = vec3(r1163,r1166,r1169);
1712    |  float r1172 = cos(r217);
1713    |  vec3 r1173 = vec3(r1172);
1714    |  vec3 r1174 = r1171*r1173;
1715    |  float r1175 = r218.y;
1716    |  float r1176 = r1171.z;
1717    |  float r1177 = r1175*r1176;
1718    |  float r1178 = r218.z;
1719    |  float r1179 = r1171.y;
1720    |  float r1180 = r1178*r1179;
1721    |  float r1181 = r1177-r1180;
1722    |  float r1182 = r218.z;
1723    |  float r1183 = r1171.x;
1724    |  float r1184 = r1182*r1183;
1725    |  float r1185 = r218.x;
1726    |  float r1186 = r1171.z;
1727    |  float r1187 = r1185*r1186;
1728    |  float r1188 = r1184-r1187;
1729    |  float r1189 = r218.x;
1730    |  float r1190 = r1171.y;
1731    |  float r1191 = r1189*r1190;
1732    |  float r1192 = r218.y;
1733    |  float r1193 = r1171.x;
1734    |  float r1194 = r1192*r1193;
1735    |  float r1195 = r1191-r1194;
1736    |  vec3 r1196 = vec3(r1181,r1188,r1195);
1737    |  float r1197 = sin(r217);
1738    |  vec3 r1198 = vec3(r1197);
1739    |  vec3 r1199 = r1196*r1198;
1740    |  vec3 r1200 = r1174-r1199;
1741    |  float r1201 = cos(r217);
1742    |  float r1202 = r25-r1201;
1743    |  vec3 r1203 = vec3(r1202);
1744    |  vec3 r1204 = r1171*r1203;
1745    |  float r1205 = dot(r218,r1204);
1746    |  vec3 r1206 = vec3(r1205);
1747    |  vec3 r1207 = r218*r1206;
1748    |  vec3 r1208 = r1200+r1207;
1749    |  float r1209 = r1208.x;
1750    |  float r1210 = r1208.y;
1751    |  float r1211 = r1208.z;
1752    |  vec4 r1212 = vec4(r1209,r1210,r1211,r1170);
1753    |  float r1213 = r0.x;
1754    |  float r1214 = r3.x;
1755    |  float r1215 = r1213-r1214;
1756    |  float r1216 = r0.y;
1757    |  float r1217 = r3.y;
1758    |  float r1218 = r1216-r1217;
1759    |  float r1219 = r0.z;
1760    |  float r1220 = r3.z;
1761    |  float r1221 = r1219-r1220;
1762    |  float r1222 = r0.w;
1763    |  vec3 r1223 = vec3(r1215,r1218,r1221);
1764    |  float r1224 = length(r1223);
1765    |  float r1225 = r1224-r15;
1766    |  bool r1226 =(r1 == r1);
1767    |  float r1227 = r1225-r1;
1768    |  float r1228 = r19*r1227;
1769    |  float r1229 = r1228/r17;
1770    |  float r1230 = r19+r1229;
1771    |  float r1231 = max(r1230,r24);
1772    |  float r1232 = min(r1231,r25);
1773    |  float r1233 = r25-r1232;
1774    |  float r1234 = r1225*r1233;
1775    |  float r1235 = r1*r1232;
1776    |  float r1236 = r1234+r1235;
1777    |  float r1237 = r17*r1232;
1778    |  float r1238 = r25-r1232;
1779    |  float r1239 = r1237*r1238;
1780    |  float r1240 = r1236-r1239;
1781    |  float r1241 =(r1226 ? r1225 : r1240);
1782    |  float r1242 = r0.x;
1783    |  float r1243 = r38.x;
1784    |  float r1244 = r1242-r1243;
1785    |  float r1245 = r0.y;
1786    |  float r1246 = r38.y;
1787    |  float r1247 = r1245-r1246;
1788    |  float r1248 = r0.z;
1789    |  float r1249 = r38.z;
1790    |  float r1250 = r1248-r1249;
1791    |  float r1251 = r0.w;
1792    |  vec3 r1252 = vec3(r1244,r1247,r1250);
1793    |  float r1253 = length(r1252);
1794    |  float r1254 = r1253-r19;
1795    |  float r1255 = min(r1241,r1254);
1796    |  float r1256 = r0.x;
1797    |  float r1257 = r53.x;
1798    |  float r1258 = r1256-r1257;
1799    |  float r1259 = r0.y;
1800    |  float r1260 = r53.y;
1801    |  float r1261 = r1259-r1260;
1802    |  float r1262 = r0.z;
1803    |  float r1263 = r53.z;
1804    |  float r1264 = r1262-r1263;
1805    |  float r1265 = r0.w;
1806    |  vec3 r1266 = vec3(r1258,r1261,r1264);
1807    |  float r1267 = length(r1266);
1808    |  float r1268 = r1267-r19;
1809    |  float r1269 = min(r1255,r1268);
1810    |  float r1270 = r0.x;
1811    |  float r1271 = r68.x;
1812    |  float r1272 = r1270-r1271;
1813    |  float r1273 = r0.y;
1814    |  float r1274 = r68.y;
1815    |  float r1275 = r1273-r1274;
1816    |  float r1276 = r0.z;
1817    |  float r1277 = r68.z;
1818    |  float r1278 = r1276-r1277;
1819    |  float r1279 = r0.w;
1820    |  vec2 r1280 = vec2(r1272,r1275);
1821    |  float r1281 = length(r1280);
1822    |  vec2 r1282 = vec2(r1281,r1278);
1823    |  vec2 r1283 = vec2(r24,r81);
1824    |  vec2 r1284 = r1282-r1283;
1825    |  vec2 r1285 = vec2(r81,r19);
1826    |  float r1286 = length(r1285);
1827    |  vec2 r1287 = vec2(r1286);
1828    |  vec2 r1288 = r1285/r1287;
1829    |  float r1289 = dot(r1284,r1288);
1830    |  float r1290 = r1288.y;
1831    |  float r1291 = r1288.x;
1832    |  float r1292 = -(r1291);
1833    |  vec2 r1293 = vec2(r1290,r1292);
1834    |  float r1294 = dot(r1284,r1293);
1835    |  float r1295 = r1282.y;
1836    |  float r1296 = -(r1295);
1837    |  float r1297 = max(r1289,r1296);
1838    |  float r1298=r1297;
1839    |  float r1299 = r1282.y;
1840    |  bool r1300 = r1299>r81;
1841    |  bool r1301 = r1294<r24;
1842    |  bool r1302 =(r1300 && r1301);
1843    |  if (r1302) {
1844    |  float r1303 = length(r1284);
1845    |  float r1304 = max(r1298,r1303);
1846    |  r1298=r1304;
1847    |  }
1848    |  float r1305 = r1282.x;
1849    |  bool r1306 = r1305>r19;
1850    |  vec2 r1307 = vec2(r81,r19);
1851    |  float r1308 = length(r1307);
1852    |  bool r1309 = r1294>r1308;
1853    |  bool r1310 =(r1306 && r1309);
1854    |  if (r1310) {
1855    |  vec2 r1311 = vec2(r19,r24);
1856    |  vec2 r1312 = r1282-r1311;
1857    |  float r1313 = length(r1312);
1858    |  float r1314 = max(r1298,r1313);
1859    |  r1298=r1314;
1860    |  }
1861    |  bool r1315 =(r1269 == r1);
1862    |  float r1316 = r1298-r1269;
1863    |  float r1317 = r19*r1316;
1864    |  float r1318 = r1317/r17;
1865    |  float r1319 = r19+r1318;
1866    |  float r1320 = max(r1319,r24);
1867    |  float r1321 = min(r1320,r25);
1868    |  float r1322 = r25-r1321;
1869    |  float r1323 = r1298*r1322;
1870    |  float r1324 = r1269*r1321;
1871    |  float r1325 = r1323+r1324;
1872    |  float r1326 = r17*r1321;
1873    |  float r1327 = r25-r1321;
1874    |  float r1328 = r1326*r1327;
1875    |  float r1329 = r1325-r1328;
1876    |  float r1330 =(r1315 ? r1298 : r1329);
1877    |  float r1331 = r0.x;
1878    |  float r1332 = r131.x;
1879    |  float r1333 = r1331-r1332;
1880    |  float r1334 = r0.y;
1881    |  float r1335 = r131.y;
1882    |  float r1336 = r1334-r1335;
1883    |  float r1337 = r0.z;
1884    |  float r1338 = r131.z;
1885    |  float r1339 = r1337-r1338;
1886    |  float r1340 = r0.w;
1887    |  vec3 r1341 = vec3(r1333,r1336,r1339);
1888    |  float r1342 = length(r1341);
1889    |  float r1343 = r1342-r143;
1890    |  bool r1344 =(r1330 == r1);
1891    |  float r1345 = r1343-r1330;
1892    |  float r1346 = r19*r1345;
1893    |  float r1347 = r1346/r17;
1894    |  float r1348 = r19+r1347;
1895    |  float r1349 = max(r1348,r24);
1896    |  float r1350 = min(r1349,r25);
1897    |  float r1351 = r25-r1350;
1898    |  float r1352 = r1343*r1351;
1899    |  float r1353 = r1330*r1350;
1900    |  float r1354 = r1352+r1353;
1901    |  float r1355 = r17*r1350;
1902    |  float r1356 = r25-r1350;
1903    |  float r1357 = r1355*r1356;
1904    |  float r1358 = r1354-r1357;
1905    |  float r1359 =(r1344 ? r1343 : r1358);
1906    |  float r1360 = r0.x;
1907    |  float r1361 = r162.x;
1908    |  float r1362 = r1360-r1361;
1909    |  float r1363 = r0.y;
1910    |  float r1364 = r162.y;
1911    |  float r1365 = r1363-r1364;
1912    |  float r1366 = r0.z;
1913    |  float r1367 = r162.z;
1914    |  float r1368 = r1366-r1367;
1915    |  float r1369 = r0.w;
1916    |  vec3 r1370 = vec3(r1362,r1365,r1368);
1917    |  float r1371 = length(r1370);
1918    |  float r1372 = r1371-r19;
1919    |  float r1373 = min(r1359,r1372);
1920    |  float r1374 = r0.x;
1921    |  float r1375 = r177.x;
1922    |  float r1376 = r1374-r1375;
1923    |  float r1377 = r0.y;
1924    |  float r1378 = r177.y;
1925    |  float r1379 = r1377-r1378;
1926    |  float r1380 = r0.z;
1927    |  float r1381 = r177.z;
1928    |  float r1382 = r1380-r1381;
1929    |  float r1383 = r0.w;
1930    |  vec3 r1384 = vec3(r1376,r1379,r1382);
1931    |  float r1385 = length(r1384);
1932    |  float r1386 = r1385-r19;
1933    |  float r1387 = min(r1373,r1386);
1934    |  float r1388 = r0.x;
1935    |  float r1389 = r192.x;
1936    |  float r1390 = r1388-r1389;
1937    |  float r1391 = r0.y;
1938    |  float r1392 = r192.y;
1939    |  float r1393 = r1391-r1392;
1940    |  float r1394 = r0.z;
1941    |  float r1395 = r192.z;
1942    |  float r1396 = r1394-r1395;
1943    |  float r1397 = r0.w;
1944    |  vec3 r1398 = vec3(r1390,r1393,r1396);
1945    |  float r1399 = length(r1398);
1946    |  float r1400 = r1399-r19;
1947    |  bool r1401 = r1400<=r24;
1948    |  bool r1402 = r1400<=r1387;
1949    |  bool r1403 =(r1401 || r1402);
1950    |  float r1404 = r0.x;
1951    |  float r1405 = r192.x;
1952    |  float r1406 = r1404-r1405;
1953    |  float r1407 = r0.y;
1954    |  float r1408 = r192.y;
1955    |  float r1409 = r1407-r1408;
1956    |  float r1410 = r0.z;
1957    |  float r1411 = r192.z;
1958    |  float r1412 = r1410-r1411;
1959    |  float r1413 = r0.w;
1960    |  vec4 r1414 = vec4(r1406,r1409,r1412,r1413);
1961    |  float r1415 = r0.x;
1962    |  float r1416 = r3.x;
1963    |  float r1417 = r1415-r1416;
1964    |  float r1418 = r0.y;
1965    |  float r1419 = r3.y;
1966    |  float r1420 = r1418-r1419;
1967    |  float r1421 = r0.z;
1968    |  float r1422 = r3.z;
1969    |  float r1423 = r1421-r1422;
1970    |  float r1424 = r0.w;
1971    |  vec3 r1425 = vec3(r1417,r1420,r1423);
1972    |  float r1426 = length(r1425);
1973    |  float r1427 = r1426-r15;
1974    |  bool r1428 =(r1 == r1);
1975    |  float r1429 = r1427-r1;
1976    |  float r1430 = r19*r1429;
1977    |  float r1431 = r1430/r17;
1978    |  float r1432 = r19+r1431;
1979    |  float r1433 = max(r1432,r24);
1980    |  float r1434 = min(r1433,r25);
1981    |  float r1435 = r25-r1434;
1982    |  float r1436 = r1427*r1435;
1983    |  float r1437 = r1*r1434;
1984    |  float r1438 = r1436+r1437;
1985    |  float r1439 = r17*r1434;
1986    |  float r1440 = r25-r1434;
1987    |  float r1441 = r1439*r1440;
1988    |  float r1442 = r1438-r1441;
1989    |  float r1443 =(r1428 ? r1427 : r1442);
1990    |  float r1444 = r0.x;
1991    |  float r1445 = r38.x;
1992    |  float r1446 = r1444-r1445;
1993    |  float r1447 = r0.y;
1994    |  float r1448 = r38.y;
1995    |  float r1449 = r1447-r1448;
1996    |  float r1450 = r0.z;
1997    |  float r1451 = r38.z;
1998    |  float r1452 = r1450-r1451;
1999    |  float r1453 = r0.w;
2000    |  vec3 r1454 = vec3(r1446,r1449,r1452);
2001    |  float r1455 = length(r1454);
2002    |  float r1456 = r1455-r19;
2003    |  float r1457 = min(r1443,r1456);
2004    |  float r1458 = r0.x;
2005    |  float r1459 = r53.x;
2006    |  float r1460 = r1458-r1459;
2007    |  float r1461 = r0.y;
2008    |  float r1462 = r53.y;
2009    |  float r1463 = r1461-r1462;
2010    |  float r1464 = r0.z;
2011    |  float r1465 = r53.z;
2012    |  float r1466 = r1464-r1465;
2013    |  float r1467 = r0.w;
2014    |  vec3 r1468 = vec3(r1460,r1463,r1466);
2015    |  float r1469 = length(r1468);
2016    |  float r1470 = r1469-r19;
2017    |  float r1471 = min(r1457,r1470);
2018    |  float r1472 = r0.x;
2019    |  float r1473 = r68.x;
2020    |  float r1474 = r1472-r1473;
2021    |  float r1475 = r0.y;
2022    |  float r1476 = r68.y;
2023    |  float r1477 = r1475-r1476;
2024    |  float r1478 = r0.z;
2025    |  float r1479 = r68.z;
2026    |  float r1480 = r1478-r1479;
2027    |  float r1481 = r0.w;
2028    |  vec2 r1482 = vec2(r1474,r1477);
2029    |  float r1483 = length(r1482);
2030    |  vec2 r1484 = vec2(r1483,r1480);
2031    |  vec2 r1485 = vec2(r24,r81);
2032    |  vec2 r1486 = r1484-r1485;
2033    |  vec2 r1487 = vec2(r81,r19);
2034    |  float r1488 = length(r1487);
2035    |  vec2 r1489 = vec2(r1488);
2036    |  vec2 r1490 = r1487/r1489;
2037    |  float r1491 = dot(r1486,r1490);
2038    |  float r1492 = r1490.y;
2039    |  float r1493 = r1490.x;
2040    |  float r1494 = -(r1493);
2041    |  vec2 r1495 = vec2(r1492,r1494);
2042    |  float r1496 = dot(r1486,r1495);
2043    |  float r1497 = r1484.y;
2044    |  float r1498 = -(r1497);
2045    |  float r1499 = max(r1491,r1498);
2046    |  float r1500=r1499;
2047    |  float r1501 = r1484.y;
2048    |  bool r1502 = r1501>r81;
2049    |  bool r1503 = r1496<r24;
2050    |  bool r1504 =(r1502 && r1503);
2051    |  if (r1504) {
2052    |  float r1505 = length(r1486);
2053    |  float r1506 = max(r1500,r1505);
2054    |  r1500=r1506;
2055    |  }
2056    |  float r1507 = r1484.x;
2057    |  bool r1508 = r1507>r19;
2058    |  vec2 r1509 = vec2(r81,r19);
2059    |  float r1510 = length(r1509);
2060    |  bool r1511 = r1496>r1510;
2061    |  bool r1512 =(r1508 && r1511);
2062    |  if (r1512) {
2063    |  vec2 r1513 = vec2(r19,r24);
2064    |  vec2 r1514 = r1484-r1513;
2065    |  float r1515 = length(r1514);
2066    |  float r1516 = max(r1500,r1515);
2067    |  r1500=r1516;
2068    |  }
2069    |  bool r1517 =(r1471 == r1);
2070    |  float r1518 = r1500-r1471;
2071    |  float r1519 = r19*r1518;
2072    |  float r1520 = r1519/r17;
2073    |  float r1521 = r19+r1520;
2074    |  float r1522 = max(r1521,r24);
2075    |  float r1523 = min(r1522,r25);
2076    |  float r1524 = r25-r1523;
2077    |  float r1525 = r1500*r1524;
2078    |  float r1526 = r1471*r1523;
2079    |  float r1527 = r1525+r1526;
2080    |  float r1528 = r17*r1523;
2081    |  float r1529 = r25-r1523;
2082    |  float r1530 = r1528*r1529;
2083    |  float r1531 = r1527-r1530;
2084    |  float r1532 =(r1517 ? r1500 : r1531);
2085    |  float r1533 = r0.x;
2086    |  float r1534 = r131.x;
2087    |  float r1535 = r1533-r1534;
2088    |  float r1536 = r0.y;
2089    |  float r1537 = r131.y;
2090    |  float r1538 = r1536-r1537;
2091    |  float r1539 = r0.z;
2092    |  float r1540 = r131.z;
2093    |  float r1541 = r1539-r1540;
2094    |  float r1542 = r0.w;
2095    |  vec3 r1543 = vec3(r1535,r1538,r1541);
2096    |  float r1544 = length(r1543);
2097    |  float r1545 = r1544-r143;
2098    |  bool r1546 =(r1532 == r1);
2099    |  float r1547 = r1545-r1532;
2100    |  float r1548 = r19*r1547;
2101    |  float r1549 = r1548/r17;
2102    |  float r1550 = r19+r1549;
2103    |  float r1551 = max(r1550,r24);
2104    |  float r1552 = min(r1551,r25);
2105    |  float r1553 = r25-r1552;
2106    |  float r1554 = r1545*r1553;
2107    |  float r1555 = r1532*r1552;
2108    |  float r1556 = r1554+r1555;
2109    |  float r1557 = r17*r1552;
2110    |  float r1558 = r25-r1552;
2111    |  float r1559 = r1557*r1558;
2112    |  float r1560 = r1556-r1559;
2113    |  float r1561 =(r1546 ? r1545 : r1560);
2114    |  float r1562 = r0.x;
2115    |  float r1563 = r162.x;
2116    |  float r1564 = r1562-r1563;
2117    |  float r1565 = r0.y;
2118    |  float r1566 = r162.y;
2119    |  float r1567 = r1565-r1566;
2120    |  float r1568 = r0.z;
2121    |  float r1569 = r162.z;
2122    |  float r1570 = r1568-r1569;
2123    |  float r1571 = r0.w;
2124    |  vec3 r1572 = vec3(r1564,r1567,r1570);
2125    |  float r1573 = length(r1572);
2126    |  float r1574 = r1573-r19;
2127    |  float r1575 = min(r1561,r1574);
2128    |  float r1576 = r0.x;
2129    |  float r1577 = r177.x;
2130    |  float r1578 = r1576-r1577;
2131    |  float r1579 = r0.y;
2132    |  float r1580 = r177.y;
2133    |  float r1581 = r1579-r1580;
2134    |  float r1582 = r0.z;
2135    |  float r1583 = r177.z;
2136    |  float r1584 = r1582-r1583;
2137    |  float r1585 = r0.w;
2138    |  vec3 r1586 = vec3(r1578,r1581,r1584);
2139    |  float r1587 = length(r1586);
2140    |  float r1588 = r1587-r19;
2141    |  bool r1589 = r1588<=r24;
2142    |  bool r1590 = r1588<=r1575;
2143    |  bool r1591 =(r1589 || r1590);
2144    |  float r1592 = r0.x;
2145    |  float r1593 = r177.x;
2146    |  float r1594 = r1592-r1593;
2147    |  float r1595 = r0.y;
2148    |  float r1596 = r177.y;
2149    |  float r1597 = r1595-r1596;
2150    |  float r1598 = r0.z;
2151    |  float r1599 = r177.z;
2152    |  float r1600 = r1598-r1599;
2153    |  float r1601 = r0.w;
2154    |  vec4 r1602 = vec4(r1594,r1597,r1600,r1601);
2155    |  float r1603 = r0.x;
2156    |  float r1604 = r3.x;
2157    |  float r1605 = r1603-r1604;
2158    |  float r1606 = r0.y;
2159    |  float r1607 = r3.y;
2160    |  float r1608 = r1606-r1607;
2161    |  float r1609 = r0.z;
2162    |  float r1610 = r3.z;
2163    |  float r1611 = r1609-r1610;
2164    |  float r1612 = r0.w;
2165    |  vec3 r1613 = vec3(r1605,r1608,r1611);
2166    |  float r1614 = length(r1613);
2167    |  float r1615 = r1614-r15;
2168    |  bool r1616 =(r1 == r1);
2169    |  float r1617 = r1615-r1;
2170    |  float r1618 = r19*r1617;
2171    |  float r1619 = r1618/r17;
2172    |  float r1620 = r19+r1619;
2173    |  float r1621 = max(r1620,r24);
2174    |  float r1622 = min(r1621,r25);
2175    |  float r1623 = r25-r1622;
2176    |  float r1624 = r1615*r1623;
2177    |  float r1625 = r1*r1622;
2178    |  float r1626 = r1624+r1625;
2179    |  float r1627 = r17*r1622;
2180    |  float r1628 = r25-r1622;
2181    |  float r1629 = r1627*r1628;
2182    |  float r1630 = r1626-r1629;
2183    |  float r1631 =(r1616 ? r1615 : r1630);
2184    |  float r1632 = r0.x;
2185    |  float r1633 = r38.x;
2186    |  float r1634 = r1632-r1633;
2187    |  float r1635 = r0.y;
2188    |  float r1636 = r38.y;
2189    |  float r1637 = r1635-r1636;
2190    |  float r1638 = r0.z;
2191    |  float r1639 = r38.z;
2192    |  float r1640 = r1638-r1639;
2193    |  float r1641 = r0.w;
2194    |  vec3 r1642 = vec3(r1634,r1637,r1640);
2195    |  float r1643 = length(r1642);
2196    |  float r1644 = r1643-r19;
2197    |  float r1645 = min(r1631,r1644);
2198    |  float r1646 = r0.x;
2199    |  float r1647 = r53.x;
2200    |  float r1648 = r1646-r1647;
2201    |  float r1649 = r0.y;
2202    |  float r1650 = r53.y;
2203    |  float r1651 = r1649-r1650;
2204    |  float r1652 = r0.z;
2205    |  float r1653 = r53.z;
2206    |  float r1654 = r1652-r1653;
2207    |  float r1655 = r0.w;
2208    |  vec3 r1656 = vec3(r1648,r1651,r1654);
2209    |  float r1657 = length(r1656);
2210    |  float r1658 = r1657-r19;
2211    |  float r1659 = min(r1645,r1658);
2212    |  float r1660 = r0.x;
2213    |  float r1661 = r68.x;
2214    |  float r1662 = r1660-r1661;
2215    |  float r1663 = r0.y;
2216    |  float r1664 = r68.y;
2217    |  float r1665 = r1663-r1664;
2218    |  float r1666 = r0.z;
2219    |  float r1667 = r68.z;
2220    |  float r1668 = r1666-r1667;
2221    |  float r1669 = r0.w;
2222    |  vec2 r1670 = vec2(r1662,r1665);
2223    |  float r1671 = length(r1670);
2224    |  vec2 r1672 = vec2(r1671,r1668);
2225    |  vec2 r1673 = vec2(r24,r81);
2226    |  vec2 r1674 = r1672-r1673;
2227    |  vec2 r1675 = vec2(r81,r19);
2228    |  float r1676 = length(r1675);
2229    |  vec2 r1677 = vec2(r1676);
2230    |  vec2 r1678 = r1675/r1677;
2231    |  float r1679 = dot(r1674,r1678);
2232    |  float r1680 = r1678.y;
2233    |  float r1681 = r1678.x;
2234    |  float r1682 = -(r1681);
2235    |  vec2 r1683 = vec2(r1680,r1682);
2236    |  float r1684 = dot(r1674,r1683);
2237    |  float r1685 = r1672.y;
2238    |  float r1686 = -(r1685);
2239    |  float r1687 = max(r1679,r1686);
2240    |  float r1688=r1687;
2241    |  float r1689 = r1672.y;
2242    |  bool r1690 = r1689>r81;
2243    |  bool r1691 = r1684<r24;
2244    |  bool r1692 =(r1690 && r1691);
2245    |  if (r1692) {
2246    |  float r1693 = length(r1674);
2247    |  float r1694 = max(r1688,r1693);
2248    |  r1688=r1694;
2249    |  }
2250    |  float r1695 = r1672.x;
2251    |  bool r1696 = r1695>r19;
2252    |  vec2 r1697 = vec2(r81,r19);
2253    |  float r1698 = length(r1697);
2254    |  bool r1699 = r1684>r1698;
2255    |  bool r1700 =(r1696 && r1699);
2256    |  if (r1700) {
2257    |  vec2 r1701 = vec2(r19,r24);
2258    |  vec2 r1702 = r1672-r1701;
2259    |  float r1703 = length(r1702);
2260    |  float r1704 = max(r1688,r1703);
2261    |  r1688=r1704;
2262    |  }
2263    |  bool r1705 =(r1659 == r1);
2264    |  float r1706 = r1688-r1659;
2265    |  float r1707 = r19*r1706;
2266    |  float r1708 = r1707/r17;
2267    |  float r1709 = r19+r1708;
2268    |  float r1710 = max(r1709,r24);
2269    |  float r1711 = min(r1710,r25);
2270    |  float r1712 = r25-r1711;
2271    |  float r1713 = r1688*r1712;
2272    |  float r1714 = r1659*r1711;
2273    |  float r1715 = r1713+r1714;
2274    |  float r1716 = r17*r1711;
2275    |  float r1717 = r25-r1711;
2276    |  float r1718 = r1716*r1717;
2277    |  float r1719 = r1715-r1718;
2278    |  float r1720 =(r1705 ? r1688 : r1719);
2279    |  float r1721 = r0.x;
2280    |  float r1722 = r131.x;
2281    |  float r1723 = r1721-r1722;
2282    |  float r1724 = r0.y;
2283    |  float r1725 = r131.y;
2284    |  float r1726 = r1724-r1725;
2285    |  float r1727 = r0.z;
2286    |  float r1728 = r131.z;
2287    |  float r1729 = r1727-r1728;
2288    |  float r1730 = r0.w;
2289    |  vec3 r1731 = vec3(r1723,r1726,r1729);
2290    |  float r1732 = length(r1731);
2291    |  float r1733 = r1732-r143;
2292    |  bool r1734 =(r1720 == r1);
2293    |  float r1735 = r1733-r1720;
2294    |  float r1736 = r19*r1735;
2295    |  float r1737 = r1736/r17;
2296    |  float r1738 = r19+r1737;
2297    |  float r1739 = max(r1738,r24);
2298    |  float r1740 = min(r1739,r25);
2299    |  float r1741 = r25-r1740;
2300    |  float r1742 = r1733*r1741;
2301    |  float r1743 = r1720*r1740;
2302    |  float r1744 = r1742+r1743;
2303    |  float r1745 = r17*r1740;
2304    |  float r1746 = r25-r1740;
2305    |  float r1747 = r1745*r1746;
2306    |  float r1748 = r1744-r1747;
2307    |  float r1749 =(r1734 ? r1733 : r1748);
2308    |  float r1750 = r0.x;
2309    |  float r1751 = r162.x;
2310    |  float r1752 = r1750-r1751;
2311    |  float r1753 = r0.y;
2312    |  float r1754 = r162.y;
2313    |  float r1755 = r1753-r1754;
2314    |  float r1756 = r0.z;
2315    |  float r1757 = r162.z;
2316    |  float r1758 = r1756-r1757;
2317    |  float r1759 = r0.w;
2318    |  vec3 r1760 = vec3(r1752,r1755,r1758);
2319    |  float r1761 = length(r1760);
2320    |  float r1762 = r1761-r19;
2321    |  bool r1763 = r1762<=r24;
2322    |  bool r1764 = r1762<=r1749;
2323    |  bool r1765 =(r1763 || r1764);
2324    |  float r1766 = r0.x;
2325    |  float r1767 = r162.x;
2326    |  float r1768 = r1766-r1767;
2327    |  float r1769 = r0.y;
2328    |  float r1770 = r162.y;
2329    |  float r1771 = r1769-r1770;
2330    |  float r1772 = r0.z;
2331    |  float r1773 = r162.z;
2332    |  float r1774 = r1772-r1773;
2333    |  float r1775 = r0.w;
2334    |  vec4 r1776 = vec4(r1768,r1771,r1774,r1775);
2335    |  float r1777 = r0.x;
2336    |  float r1778 = r3.x;
2337    |  float r1779 = r1777-r1778;
2338    |  float r1780 = r0.y;
2339    |  float r1781 = r3.y;
2340    |  float r1782 = r1780-r1781;
2341    |  float r1783 = r0.z;
2342    |  float r1784 = r3.z;
2343    |  float r1785 = r1783-r1784;
2344    |  float r1786 = r0.w;
2345    |  vec3 r1787 = vec3(r1779,r1782,r1785);
2346    |  float r1788 = length(r1787);
2347    |  float r1789 = r1788-r15;
2348    |  bool r1790 =(r1 == r1);
2349    |  float r1791 = r1789-r1;
2350    |  float r1792 = r19*r1791;
2351    |  float r1793 = r1792/r17;
2352    |  float r1794 = r19+r1793;
2353    |  float r1795 = max(r1794,r24);
2354    |  float r1796 = min(r1795,r25);
2355    |  float r1797 = r25-r1796;
2356    |  float r1798 = r1789*r1797;
2357    |  float r1799 = r1*r1796;
2358    |  float r1800 = r1798+r1799;
2359    |  float r1801 = r17*r1796;
2360    |  float r1802 = r25-r1796;
2361    |  float r1803 = r1801*r1802;
2362    |  float r1804 = r1800-r1803;
2363    |  float r1805 =(r1790 ? r1789 : r1804);
2364    |  float r1806 = r0.x;
2365    |  float r1807 = r38.x;
2366    |  float r1808 = r1806-r1807;
2367    |  float r1809 = r0.y;
2368    |  float r1810 = r38.y;
2369    |  float r1811 = r1809-r1810;
2370    |  float r1812 = r0.z;
2371    |  float r1813 = r38.z;
2372    |  float r1814 = r1812-r1813;
2373    |  float r1815 = r0.w;
2374    |  vec3 r1816 = vec3(r1808,r1811,r1814);
2375    |  float r1817 = length(r1816);
2376    |  float r1818 = r1817-r19;
2377    |  float r1819 = min(r1805,r1818);
2378    |  float r1820 = r0.x;
2379    |  float r1821 = r53.x;
2380    |  float r1822 = r1820-r1821;
2381    |  float r1823 = r0.y;
2382    |  float r1824 = r53.y;
2383    |  float r1825 = r1823-r1824;
2384    |  float r1826 = r0.z;
2385    |  float r1827 = r53.z;
2386    |  float r1828 = r1826-r1827;
2387    |  float r1829 = r0.w;
2388    |  vec3 r1830 = vec3(r1822,r1825,r1828);
2389    |  float r1831 = length(r1830);
2390    |  float r1832 = r1831-r19;
2391    |  float r1833 = min(r1819,r1832);
2392    |  float r1834 = r0.x;
2393    |  float r1835 = r68.x;
2394    |  float r1836 = r1834-r1835;
2395    |  float r1837 = r0.y;
2396    |  float r1838 = r68.y;
2397    |  float r1839 = r1837-r1838;
2398    |  float r1840 = r0.z;
2399    |  float r1841 = r68.z;
2400    |  float r1842 = r1840-r1841;
2401    |  float r1843 = r0.w;
2402    |  vec2 r1844 = vec2(r1836,r1839);
2403    |  float r1845 = length(r1844);
2404    |  vec2 r1846 = vec2(r1845,r1842);
2405    |  vec2 r1847 = vec2(r24,r81);
2406    |  vec2 r1848 = r1846-r1847;
2407    |  vec2 r1849 = vec2(r81,r19);
2408    |  float r1850 = length(r1849);
2409    |  vec2 r1851 = vec2(r1850);
2410    |  vec2 r1852 = r1849/r1851;
2411    |  float r1853 = dot(r1848,r1852);
2412    |  float r1854 = r1852.y;
2413    |  float r1855 = r1852.x;
2414    |  float r1856 = -(r1855);
2415    |  vec2 r1857 = vec2(r1854,r1856);
2416    |  float r1858 = dot(r1848,r1857);
2417    |  float r1859 = r1846.y;
2418    |  float r1860 = -(r1859);
2419    |  float r1861 = max(r1853,r1860);
2420    |  float r1862=r1861;
2421    |  float r1863 = r1846.y;
2422    |  bool r1864 = r1863>r81;
2423    |  bool r1865 = r1858<r24;
2424    |  bool r1866 =(r1864 && r1865);
2425    |  if (r1866) {
2426    |  float r1867 = length(r1848);
2427    |  float r1868 = max(r1862,r1867);
2428    |  r1862=r1868;
2429    |  }
2430    |  float r1869 = r1846.x;
2431    |  bool r1870 = r1869>r19;
2432    |  vec2 r1871 = vec2(r81,r19);
2433    |  float r1872 = length(r1871);
2434    |  bool r1873 = r1858>r1872;
2435    |  bool r1874 =(r1870 && r1873);
2436    |  if (r1874) {
2437    |  vec2 r1875 = vec2(r19,r24);
2438    |  vec2 r1876 = r1846-r1875;
2439    |  float r1877 = length(r1876);
2440    |  float r1878 = max(r1862,r1877);
2441    |  r1862=r1878;
2442    |  }
2443    |  bool r1879 =(r1833 == r1);
2444    |  float r1880 = r1862-r1833;
2445    |  float r1881 = r19*r1880;
2446    |  float r1882 = r1881/r17;
2447    |  float r1883 = r19+r1882;
2448    |  float r1884 = max(r1883,r24);
2449    |  float r1885 = min(r1884,r25);
2450    |  float r1886 = r25-r1885;
2451    |  float r1887 = r1862*r1886;
2452    |  float r1888 = r1833*r1885;
2453    |  float r1889 = r1887+r1888;
2454    |  float r1890 = r17*r1885;
2455    |  float r1891 = r25-r1885;
2456    |  float r1892 = r1890*r1891;
2457    |  float r1893 = r1889-r1892;
2458    |  float r1894 =(r1879 ? r1862 : r1893);
2459    |  float r1895 = r0.x;
2460    |  float r1896 = r131.x;
2461    |  float r1897 = r1895-r1896;
2462    |  float r1898 = r0.y;
2463    |  float r1899 = r131.y;
2464    |  float r1900 = r1898-r1899;
2465    |  float r1901 = r0.z;
2466    |  float r1902 = r131.z;
2467    |  float r1903 = r1901-r1902;
2468    |  float r1904 = r0.w;
2469    |  vec3 r1905 = vec3(r1897,r1900,r1903);
2470    |  float r1906 = length(r1905);
2471    |  float r1907 = r1906-r143;
2472    |  bool r1908 = r1907<=r24;
2473    |  bool r1909 = r1907<=r1894;
2474    |  bool r1910 =(r1908 || r1909);
2475    |  float r1911 = r0.x;
2476    |  float r1912 = r131.x;
2477    |  float r1913 = r1911-r1912;
2478    |  float r1914 = r0.y;
2479    |  float r1915 = r131.y;
2480    |  float r1916 = r1914-r1915;
2481    |  float r1917 = r0.z;
2482    |  float r1918 = r131.z;
2483    |  float r1919 = r1917-r1918;
2484    |  float r1920 = r0.w;
2485    |  vec4 r1921 = vec4(r1913,r1916,r1919,r1920);
2486    |  float r1922 = r0.x;
2487    |  float r1923 = r3.x;
2488    |  float r1924 = r1922-r1923;
2489    |  float r1925 = r0.y;
2490    |  float r1926 = r3.y;
2491    |  float r1927 = r1925-r1926;
2492    |  float r1928 = r0.z;
2493    |  float r1929 = r3.z;
2494    |  float r1930 = r1928-r1929;
2495    |  float r1931 = r0.w;
2496    |  vec3 r1932 = vec3(r1924,r1927,r1930);
2497    |  float r1933 = length(r1932);
2498    |  float r1934 = r1933-r15;
2499    |  bool r1935 =(r1 == r1);
2500    |  float r1936 = r1934-r1;
2501    |  float r1937 = r19*r1936;
2502    |  float r1938 = r1937/r17;
2503    |  float r1939 = r19+r1938;
2504    |  float r1940 = max(r1939,r24);
2505    |  float r1941 = min(r1940,r25);
2506    |  float r1942 = r25-r1941;
2507    |  float r1943 = r1934*r1942;
2508    |  float r1944 = r1*r1941;
2509    |  float r1945 = r1943+r1944;
2510    |  float r1946 = r17*r1941;
2511    |  float r1947 = r25-r1941;
2512    |  float r1948 = r1946*r1947;
2513    |  float r1949 = r1945-r1948;
2514    |  float r1950 =(r1935 ? r1934 : r1949);
2515    |  float r1951 = r0.x;
2516    |  float r1952 = r38.x;
2517    |  float r1953 = r1951-r1952;
2518    |  float r1954 = r0.y;
2519    |  float r1955 = r38.y;
2520    |  float r1956 = r1954-r1955;
2521    |  float r1957 = r0.z;
2522    |  float r1958 = r38.z;
2523    |  float r1959 = r1957-r1958;
2524    |  float r1960 = r0.w;
2525    |  vec3 r1961 = vec3(r1953,r1956,r1959);
2526    |  float r1962 = length(r1961);
2527    |  float r1963 = r1962-r19;
2528    |  float r1964 = min(r1950,r1963);
2529    |  float r1965 = r0.x;
2530    |  float r1966 = r53.x;
2531    |  float r1967 = r1965-r1966;
2532    |  float r1968 = r0.y;
2533    |  float r1969 = r53.y;
2534    |  float r1970 = r1968-r1969;
2535    |  float r1971 = r0.z;
2536    |  float r1972 = r53.z;
2537    |  float r1973 = r1971-r1972;
2538    |  float r1974 = r0.w;
2539    |  vec3 r1975 = vec3(r1967,r1970,r1973);
2540    |  float r1976 = length(r1975);
2541    |  float r1977 = r1976-r19;
2542    |  float r1978 = min(r1964,r1977);
2543    |  float r1979 = r0.x;
2544    |  float r1980 = r68.x;
2545    |  float r1981 = r1979-r1980;
2546    |  float r1982 = r0.y;
2547    |  float r1983 = r68.y;
2548    |  float r1984 = r1982-r1983;
2549    |  float r1985 = r0.z;
2550    |  float r1986 = r68.z;
2551    |  float r1987 = r1985-r1986;
2552    |  float r1988 = r0.w;
2553    |  vec2 r1989 = vec2(r1981,r1984);
2554    |  float r1990 = length(r1989);
2555    |  vec2 r1991 = vec2(r1990,r1987);
2556    |  vec2 r1992 = vec2(r24,r81);
2557    |  vec2 r1993 = r1991-r1992;
2558    |  vec2 r1994 = vec2(r81,r19);
2559    |  float r1995 = length(r1994);
2560    |  vec2 r1996 = vec2(r1995);
2561    |  vec2 r1997 = r1994/r1996;
2562    |  float r1998 = dot(r1993,r1997);
2563    |  float r1999 = r1997.y;
2564    |  float r2000 = r1997.x;
2565    |  float r2001 = -(r2000);
2566    |  vec2 r2002 = vec2(r1999,r2001);
2567    |  float r2003 = dot(r1993,r2002);
2568    |  float r2004 = r1991.y;
2569    |  float r2005 = -(r2004);
2570    |  float r2006 = max(r1998,r2005);
2571    |  float r2007=r2006;
2572    |  float r2008 = r1991.y;
2573    |  bool r2009 = r2008>r81;
2574    |  bool r2010 = r2003<r24;
2575    |  bool r2011 =(r2009 && r2010);
2576    |  if (r2011) {
2577    |  float r2012 = length(r1993);
2578    |  float r2013 = max(r2007,r2012);
2579    |  r2007=r2013;
2580    |  }
2581    |  float r2014 = r1991.x;
2582    |  bool r2015 = r2014>r19;
2583    |  vec2 r2016 = vec2(r81,r19);
2584    |  float r2017 = length(r2016);
2585    |  bool r2018 = r2003>r2017;
2586    |  bool r2019 =(r2015 && r2018);
2587    |  if (r2019) {
2588    |  vec2 r2020 = vec2(r19,r24);
2589    |  vec2 r2021 = r1991-r2020;
2590    |  float r2022 = length(r2021);
2591    |  float r2023 = max(r2007,r2022);
2592    |  r2007=r2023;
2593    |  }
2594    |  bool r2024 = r2007<=r24;
2595    |  bool r2025 = r2007<=r1978;
2596    |  bool r2026 =(r2024 || r2025);
2597    |  float r2027 = r0.x;
2598    |  float r2028 = r68.x;
2599    |  float r2029 = r2027-r2028;
2600    |  float r2030 = r0.y;
2601    |  float r2031 = r68.y;
2602    |  float r2032 = r2030-r2031;
2603    |  float r2033 = r0.z;
2604    |  float r2034 = r68.z;
2605    |  float r2035 = r2033-r2034;
2606    |  float r2036 = r0.w;
2607    |  vec4 r2037 = vec4(r2029,r2032,r2035,r2036);
2608    |  float r2038 = r0.x;
2609    |  float r2039 = r3.x;
2610    |  float r2040 = r2038-r2039;
2611    |  float r2041 = r0.y;
2612    |  float r2042 = r3.y;
2613    |  float r2043 = r2041-r2042;
2614    |  float r2044 = r0.z;
2615    |  float r2045 = r3.z;
2616    |  float r2046 = r2044-r2045;
2617    |  float r2047 = r0.w;
2618    |  vec3 r2048 = vec3(r2040,r2043,r2046);
2619    |  float r2049 = length(r2048);
2620    |  float r2050 = r2049-r15;
2621    |  bool r2051 =(r1 == r1);
2622    |  float r2052 = r2050-r1;
2623    |  float r2053 = r19*r2052;
2624    |  float r2054 = r2053/r17;
2625    |  float r2055 = r19+r2054;
2626    |  float r2056 = max(r2055,r24);
2627    |  float r2057 = min(r2056,r25);
2628    |  float r2058 = r25-r2057;
2629    |  float r2059 = r2050*r2058;
2630    |  float r2060 = r1*r2057;
2631    |  float r2061 = r2059+r2060;
2632    |  float r2062 = r17*r2057;
2633    |  float r2063 = r25-r2057;
2634    |  float r2064 = r2062*r2063;
2635    |  float r2065 = r2061-r2064;
2636    |  float r2066 =(r2051 ? r2050 : r2065);
2637    |  float r2067 = r0.x;
2638    |  float r2068 = r38.x;
2639    |  float r2069 = r2067-r2068;
2640    |  float r2070 = r0.y;
2641    |  float r2071 = r38.y;
2642    |  float r2072 = r2070-r2071;
2643    |  float r2073 = r0.z;
2644    |  float r2074 = r38.z;
2645    |  float r2075 = r2073-r2074;
2646    |  float r2076 = r0.w;
2647    |  vec3 r2077 = vec3(r2069,r2072,r2075);
2648    |  float r2078 = length(r2077);
2649    |  float r2079 = r2078-r19;
2650    |  float r2080 = min(r2066,r2079);
2651    |  float r2081 = r0.x;
2652    |  float r2082 = r53.x;
2653    |  float r2083 = r2081-r2082;
2654    |  float r2084 = r0.y;
2655    |  float r2085 = r53.y;
2656    |  float r2086 = r2084-r2085;
2657    |  float r2087 = r0.z;
2658    |  float r2088 = r53.z;
2659    |  float r2089 = r2087-r2088;
2660    |  float r2090 = r0.w;
2661    |  vec3 r2091 = vec3(r2083,r2086,r2089);
2662    |  float r2092 = length(r2091);
2663    |  float r2093 = r2092-r19;
2664    |  bool r2094 = r2093<=r24;
2665    |  bool r2095 = r2093<=r2080;
2666    |  bool r2096 =(r2094 || r2095);
2667    |  float r2097 = r0.x;
2668    |  float r2098 = r53.x;
2669    |  float r2099 = r2097-r2098;
2670    |  float r2100 = r0.y;
2671    |  float r2101 = r53.y;
2672    |  float r2102 = r2100-r2101;
2673    |  float r2103 = r0.z;
2674    |  float r2104 = r53.z;
2675    |  float r2105 = r2103-r2104;
2676    |  float r2106 = r0.w;
2677    |  vec4 r2107 = vec4(r2099,r2102,r2105,r2106);
2678    |  float r2108 = r0.x;
2679    |  float r2109 = r3.x;
2680    |  float r2110 = r2108-r2109;
2681    |  float r2111 = r0.y;
2682    |  float r2112 = r3.y;
2683    |  float r2113 = r2111-r2112;
2684    |  float r2114 = r0.z;
2685    |  float r2115 = r3.z;
2686    |  float r2116 = r2114-r2115;
2687    |  float r2117 = r0.w;
2688    |  vec3 r2118 = vec3(r2110,r2113,r2116);
2689    |  float r2119 = length(r2118);
2690    |  float r2120 = r2119-r15;
2691    |  bool r2121 =(r1 == r1);
2692    |  float r2122 = r2120-r1;
2693    |  float r2123 = r19*r2122;
2694    |  float r2124 = r2123/r17;
2695    |  float r2125 = r19+r2124;
2696    |  float r2126 = max(r2125,r24);
2697    |  float r2127 = min(r2126,r25);
2698    |  float r2128 = r25-r2127;
2699    |  float r2129 = r2120*r2128;
2700    |  float r2130 = r1*r2127;
2701    |  float r2131 = r2129+r2130;
2702    |  float r2132 = r17*r2127;
2703    |  float r2133 = r25-r2127;
2704    |  float r2134 = r2132*r2133;
2705    |  float r2135 = r2131-r2134;
2706    |  float r2136 =(r2121 ? r2120 : r2135);
2707    |  float r2137 = r0.x;
2708    |  float r2138 = r38.x;
2709    |  float r2139 = r2137-r2138;
2710    |  float r2140 = r0.y;
2711    |  float r2141 = r38.y;
2712    |  float r2142 = r2140-r2141;
2713    |  float r2143 = r0.z;
2714    |  float r2144 = r38.z;
2715    |  float r2145 = r2143-r2144;
2716    |  float r2146 = r0.w;
2717    |  vec3 r2147 = vec3(r2139,r2142,r2145);
2718    |  float r2148 = length(r2147);
2719    |  float r2149 = r2148-r19;
2720    |  bool r2150 = r2149<=r24;
2721    |  bool r2151 = r2149<=r2136;
2722    |  bool r2152 =(r2150 || r2151);
2723    |  float r2153 = r0.x;
2724    |  float r2154 = r38.x;
2725    |  float r2155 = r2153-r2154;
2726    |  float r2156 = r0.y;
2727    |  float r2157 = r38.y;
2728    |  float r2158 = r2156-r2157;
2729    |  float r2159 = r0.z;
2730    |  float r2160 = r38.z;
2731    |  float r2161 = r2159-r2160;
2732    |  float r2162 = r0.w;
2733    |  vec4 r2163 = vec4(r2155,r2158,r2161,r2162);
2734    |  float r2164 = r0.x;
2735    |  float r2165 = r3.x;
2736    |  float r2166 = r2164-r2165;
2737    |  float r2167 = r0.y;
2738    |  float r2168 = r3.y;
2739    |  float r2169 = r2167-r2168;
2740    |  float r2170 = r0.z;
2741    |  float r2171 = r3.z;
2742    |  float r2172 = r2170-r2171;
2743    |  float r2173 = r0.w;
2744    |  vec3 r2174 = vec3(r2166,r2169,r2172);
2745    |  float r2175 = length(r2174);
2746    |  float r2176 = r2175-r15;
2747    |  bool r2177 = r2176<=r24;
2748    |  bool r2178 = r2176<=r1;
2749    |  bool r2179 =(r2177 || r2178);
2750    |  float r2180 = r0.x;
2751    |  float r2181 = r3.x;
2752    |  float r2182 = r2180-r2181;
2753    |  float r2183 = r0.y;
2754    |  float r2184 = r3.y;
2755    |  float r2185 = r2183-r2184;
2756    |  float r2186 = r0.z;
2757    |  float r2187 = r3.z;
2758    |  float r2188 = r2186-r2187;
2759    |  float r2189 = r0.w;
2760    |  vec4 r2190 = vec4(r2182,r2185,r2188,r2189);
2761    |  vec3 r2191 =(r2179 ? r450 : r450);
2762    |  vec3 r2192 =(r2152 ? r450 : r2191);
2763    |  vec3 r2193 =(r2096 ? r450 : r2192);
2764    |  vec3 r2194 =(r2026 ? r450 : r2193);
2765    |  vec3 r2195 =(r1910 ? r450 : r2194);
2766    |  vec3 r2196 =(r1765 ? r450 : r2195);
2767    |  vec3 r2197 =(r1591 ? r450 : r2196);
2768    |  vec3 r2198 =(r1403 ? r450 : r2197);
2769    |  vec3 r2199 =(r1160 ? r450 : r2198);
2770    |  vec3 r2200 =(r830 ? r450 : r2199);
2771    |  vec3 r2201 =(r434 ? r450 : r2200);
2772    |  return r2201;
2773    |}
2774    |const vec3 bbox_min = vec3(-21.3125,-7.625,-15.4375);
2775    |const vec3 bbox_max = vec3(20.875,47.4375,15.4375);
2776    |// ray marching. ro is ray origin, rd is ray direction (unit vector).
2777    |// result is (t,r,g,b), where
2778    |//  * t is the distance that we marched,
2779    |//  * r,g,b is the colour of the distance field at the point we ended up at.
2780    |//    (-1,-1,-1) means no object was hit.
2781    |vec4 castRay( in vec3 ro, in vec3 rd, float time )
2782    |{
2783    |    float tmin = 0.0;
2784    |    float tmax = ray_max_depth;
2785    |
2786    |    float t = tmin;
2787    |    vec3 c = vec3(-1.0,-1.0,-1.0);
2788    |    for (int i=0; i<ray_max_iter; i++) {
2789    |        float precis = 0.0005*t;
2790    |        vec4 p = vec4(ro+rd*t,time);
2791    |        float d = dist(p);
2792    |        if (abs(d) < abs(precis)) {
2793    |            c = colour(p);
2794    |            break;
2795    |        }
2796    |        t += d;
2797    |        if (t > tmax) break;
2798    |    }
2799    |    return vec4( t, c );
2800    |}
2801    |vec3 calcNormal( in vec3 pos, float time )
2802    |{
2803    |    vec2 e = vec2(1.0,-1.0)*0.5773*0.0005;
2804    |    return normalize( e.xyy*dist( vec4(pos + e.xyy,time) ) +
2805    |                      e.yyx*dist( vec4(pos + e.yyx,time) ) +
2806    |                      e.yxy*dist( vec4(pos + e.yxy,time) ) +
2807    |                      e.xxx*dist( vec4(pos + e.xxx,time) ) );
2808    |}
2809    |float calcAO( in vec3 pos, in vec3 nor, float time )
2810    |{
2811    |    float occ = 0.0;
2812    |    float sca = 1.0;
2813    |    for( int i=0; i<5; i++ )
2814    |    {
2815    |        float hr = 0.01 + 0.12*float(i)/4.0;
2816    |        vec3 aopos =  nor * hr + pos;
2817    |        float dd = dist( vec4(aopos,time) );
2818    |        occ += -(dd-hr)*sca;
2819    |        sca *= 0.95;
2820    |    }
2821    |    return clamp( 1.0 - 3.0*occ, 0.0, 1.0 );
2822    |}
2823    |// in ro: ray origin
2824    |// in rd: ray direction
2825    |// out: rgb colour
2826    |vec3 render( in vec3 ro, in vec3 rd, float time )
2827    |{
2828    |    //vec3 col = vec3(0.7, 0.9, 1.0) +rd.z*0.8;
2829    |    vec3 col = background_colour;
2830    |    vec4 res = castRay(ro,rd, time);
2831    |    float t = res.x;
2832    |    vec3 c = res.yzw;
2833    |    if( c.x>=0.0 )
2834    |    {
2835    |        vec3 pos = ro + t*rd;
2836    |        vec3 nor = calcNormal( pos, time );
2837    |        vec3 ref = reflect( rd, nor );
2838    |
2839    |        // material
2840    |        col = c;
2841    |
2842    |        // lighting
2843    |        float occ = calcAO( pos, nor, time );
2844    |        vec3  lig = normalize( vec3(-0.4, 0.6, 0.7) );
2845    |        float amb = clamp( 0.5+0.5*nor.z, 0.0, 1.0 );
2846    |        float dif = clamp( dot( nor, lig ), 0.0, 1.0 );
2847    |        float bac = clamp( dot( nor, normalize(vec3(-lig.x,lig.y,0.0))), 0.0, 1.0 )*clamp( 1.0-pos.z,0.0,1.0);
2848    |        float dom = smoothstep( -0.1, 0.1, ref.z );
2849    |        float fre = pow( clamp(1.0+dot(nor,rd),0.0,1.0), 2.0 );
2850    |        float spe = pow(clamp( dot( ref, lig ), 0.0, 1.0 ),16.0);
2851    |
2852    |        vec3 lin = vec3(0.0);
2853    |        lin += 1.30*dif*vec3(1.00,0.80,0.55);
2854    |        lin += 2.00*spe*vec3(1.00,0.90,0.70)*dif;
2855    |        lin += 0.40*amb*vec3(0.40,0.60,1.00)*occ;
2856    |        lin += 0.50*dom*vec3(0.40,0.60,1.00)*occ;
2857    |        lin += 0.50*bac*vec3(0.35,0.35,0.35)*occ;
2858    |        lin += 0.25*fre*vec3(1.00,1.00,1.00)*occ;
2859    |        vec3 iqcol = col*lin;
2860    |
2861    |        //col = mix( col, vec3(0.8,0.9,1.0), 1.0-exp( -0.0002*t*t*t ) );
2862    |        col = mix(col,iqcol, 0.5);
2863    |    }
2864    |
2865    |    return vec3( clamp(col,0.0,1.0) );
2866    |}
2867    |// Create a matrix to transform coordinates to look towards a given point.
2868    |// * `eye` is the position of the camera.
2869    |// * `centre` is the position to look towards.
2870    |// * `up` is the 'up' direction.
2871    |mat3 look_at(vec3 eye, vec3 centre, vec3 up)
2872    |{
2873    |    vec3 ww = normalize(centre - eye);
2874    |    vec3 uu = normalize(cross(ww, up));
2875    |    vec3 vv = normalize(cross(uu, ww));
2876    |    return mat3(uu, vv, ww);
2877    |}
2878    |// Generate a ray direction for ray-casting.
2879    |// * `camera` is the camera look-at matrix.
2880    |// * `pos` is the screen position, normally in the range -1..1
2881    |// * `lens` is the lens length of the camera (encodes field-of-view).
2882    |//   0 is very wide, and 2 is a good default.
2883    |vec3 ray_direction(mat3 camera, vec2 pos, float lens)
2884    |{
2885    |    return normalize(camera * vec3(pos, lens));
2886    |}
2887    |void mainImage( out vec4 fragColour, in vec2 fragCoord )
2888    |{
2889    |    vec3 col = vec3(0.0);
2890    |    const vec3 origin = (bbox_min + bbox_max) / 2.0;
2891    |    const vec3 radius = (bbox_max - bbox_min) / 2.0;
2892    |    float r = max(radius.x, max(radius.y, radius.z)) / 1.3;
2893    |#if AA>1
2894    |  for (int m=0; m<AA; ++m)
2895    |  for (int n=0; n<AA; ++n) {
2896    |    vec2 o = vec2(float(m),float(n)) / float(AA) - 0.5;
2897    |#else
2898    |    const vec2 o = vec2(0.0);
2899    |#endif
2900    |    vec2 p = -1.0 + 2.0 * (fragCoord+o) / iResolution.xy;
2901    |    p.x *= iResolution.x/iResolution.y;
2902    |
2903    |#ifdef GLSLVIEWER
2904    |    vec3 eye = vec3(u_eye3d.x, -u_eye3d.z, u_eye3d.y)*r + origin;
2905    |    vec3 centre = vec3(u_centre3d.x, -u_centre3d.z, u_centre3d.y)*r + origin;
2906    |    vec3 up = vec3(u_up3d.x, -u_up3d.z, u_up3d.y);
2907    |#else
2908    |    vec3 eye = vec3(2.6, -4.5, 3.0);
2909    |    vec3 centre = vec3(0.0, 0.0, 0.0);
2910    |    vec3 up = vec3(-0.25, 0.433, 0.866);
2911    |#endif
2912    |    mat3 camera = look_at(eye, centre, up);
2913    |    vec3 dir = ray_direction(camera, p, 2.5);
2914    |
2915    |#if TAA>1
2916    |  for (int t=0; t<TAA; ++t) {
2917    |    float time = iTime + float(t)/float(TAA)*float(FDUR);
2918    |#else
2919    |    float time = iTime;
2920    |#endif
2921    |    col += render( eye, dir, time );
2922    |
2923    |#if TAA>1
2924    |  }
2925    |#endif
2926    |#if AA>1
2927    |  }
2928    |#endif
2929    |#if AA>1 || TAA>1
2930    |    col /= float(AA*AA*TAA);
2931    |#endif
2932    |
2933    |    // convert linear RGB to sRGB
2934    |    col = pow(col, vec3(0.454545454545454545));
2935    |    fragColour = vec4(col,1.0);
2936    |}
2937    ";
2938  parameters: [
2939    {name: "rv_smoothness", type: "float", value: 1.75, label: "smoothness", config: {slider:[0.01,5]}};
2940  ];
2941}
2942