-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·1118 lines (967 loc) · 50.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="img/favicon.ico">
<title>Mock3D</title>
<!-- Google font -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet"> <!--have bootstrap.min.css-->
<link href="css/offcanvas.css" rel="stylesheet">
<link href="css/bootstrap-slider.css" rel="stylesheet">
<link href="css/jquery.minicolors.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/mock3d.css" rel="stylesheet">
<script id="vertex-shader" type="x-shader/x-vertex">
#define max_lights 14
attribute vec4 vPosition;
attribute vec3 vNormal;
attribute vec2 texcoord;
varying vec2 f_texcoord;
varying vec3 fNormal;
varying vec3 pLight[max_lights];
varying float lightN;// = lightNum
varying vec2 mouseXYcopy;
uniform float lightNum;
uniform vec2 mouseXY[max_lights];
uniform float pointLightDis[max_lights];
void main()
{
gl_Position = vPosition;
vec4 transformedNormal = vec4(vNormal, 1.0) /* + vec4(0.0, 0.0, 0.5, 0.0) */;
fNormal = normalize(transformedNormal.xyz);
for (int i = 0; i < max_lights; i++)
{
if (float(i)< float(lightNum))
{
float x = mouseXY[i].x * 2.0 ;
float y = mouseXY[i].y * 2.0;
float z = pointLightDis[i];
pLight[i] = vec3(x, -y, z + 0.05);
}else{
break;
}
}
mouseXYcopy = mouseXY[0];
lightN = lightNum;
f_texcoord = texcoord;
}
</script>
<script id="fragment-shader" type="x-shader/x-fragment">
#define max_lights 14
precision mediump float;
varying vec2 f_texcoord;
varying vec3 fNormal;//(0,0,1)
varying float lightN;
varying vec3 pLight[max_lights];
varying vec2 mouseXYcopy;
uniform sampler2D uSamplerColor0, uSamplerColor1, uSamplerNormal, uSamplerForeground, uSamplerBackground, uSamplerAlpha;
uniform int currentLight;
uniform bool lightsOnly;
uniform vec3 lightColor[max_lights];
uniform float lightIntensity[max_lights];
uniform float pointLightDecay[max_lights];
uniform bool showDiffuse[max_lights];
uniform bool showSpec[max_lights];
uniform float styleBright, styleDark;
uniform float alphaR, alphaG, alphaB;
uniform float logIOR, BGdis;
uniform float FGdis;
uniform int reflMap;// 1: plane, 2:hemisphere
uniform float FGshiftX;
uniform float FGshiftY;
uniform float FGscaleX;
uniform float FGscaleY;
uniform float fresnelIntensity;
uniform float fresnelB;
uniform float fresnelC;
uniform bool checkFresnel;
vec4 normal()
{
vec4 normalMap = texture2D(uSamplerNormal, vec2(f_texcoord.s, f_texcoord.t) );
vec3 normalDisplace = normalMap.rgb;
normalDisplace = 2.0*normalDisplace - 1.0;
normalDisplace = normalize(normalDisplace);
return vec4(normalize(fNormal + normalDisplace), normalMap.a);
}
vec4 diffuse(vec3 n)
{
vec3 currentP = vec3(f_texcoord.s - 0.5, f_texcoord.t-0.5, 0.0);
vec4 color = vec4(0,0,0,1);
float lightWeight = 0.0;
for (int i = 0; i < max_lights; i++)
{
if (float(i)< float(lightN))
{
vec3 vLight = normalize( pLight[i] - currentP);
//float cosTheta = max( dot(n, vLight), 0.0);
float cosTheta = dot(n, vLight);//+ 1.0 )/2.0;
float t = (cosTheta - styleDark) / (styleBright - styleDark);
if (t>1.0) t=1.0; if (t<0.0) t=0.0;
if ( showDiffuse[i] )
{
float dis = length( pLight[i] - currentP );
color += (1.0 - t) * vec4(lightColor[i], 1.0) * lightIntensity[i] / ( 1.0 + pointLightDecay[i] * dis *4.0);
lightWeight+=lightIntensity[i] ;
};
}else{
break;
}
}
vec4 T = color;//lightWeight;
vec4 c0 = texture2D(uSamplerColor0, vec2(f_texcoord.s, f_texcoord.t) );//dark
vec4 c1 = texture2D(uSamplerColor1, vec2(f_texcoord.s, f_texcoord.t) );//bright
vec4 colorFinal = c0 * (1.0 - T) + c1 * T;
if (lightsOnly )
{
return T;
}else{
return colorFinal;
}
}
vec3 alphaControl()
{
vec4 alphaMap = texture2D(uSamplerAlpha, vec2(f_texcoord.s, f_texcoord.t) );
return alphaMap.rgb;
}
vec3 spec(vec3 n)
{
vec3 currentP = vec3(f_texcoord.s - 0.5, f_texcoord.t-0.5, 0.0);
vec3 finalSpec = vec3(0.0, 0.0, 0.0);
for (int i = 0; i < max_lights; i++)
{
if (float(i)< float(lightN))
{
vec3 vLight = normalize( pLight[i] - currentP);
if (showSpec[i] )
{
vec3 specColor = lightColor[i];
vec3 viewVector = vec3(0.0, 0.0, 1.0);
vec3 RVector = - vLight + 2.0 * dot(n, vLight) * n ;
float temp = dot(RVector, viewVector);
if ( temp < 0.0 ) temp = 0.0;
float spec = pow(temp, 200.0);
finalSpec += specColor * spec;
}
}else{
break;
}
}
return finalSpec ;
}
//Reflected texture is treated as ultimate plane.
vec3 reflect1(vec3 n)
{
float reflectIntensity = 1.0;
vec3 reflect = - 1.0 * vec3(0.0, 0.0, 1.0) + 2.0 * dot(n, vec3(0.0, 0.0, 1.0)) * n;
vec2 reflCoord = f_texcoord + (reflect.xy / reflect.z) * FGdis + vec2( -mouseXYcopy.x * 0.5, mouseXYcopy.y * 0.5) ;//+ vLight0.xy ;
vec2 v = (reflCoord - vec2(0.5, 0.5)) / 0.5;
reflCoord.x = v.x * ( 1.0 - FGscaleX ) - FGshiftX + 0.5;
reflCoord.y = v.y * ( 1.0 - FGscaleY ) - FGshiftY + 0.5;
if (reflCoord.x > 1.0 || reflCoord.x < 0.0)
{
reflCoord.x = reflCoord.x - float(floor(reflCoord.x));
if ( floor(reflCoord.x) / 2.0 == 0.0)
{
reflCoord.x = 1.0 - reflCoord.x;
}
}
if (reflCoord.y > 1.0 || reflCoord.y < 0.0)
{
reflCoord.y = reflCoord.y - float(floor(reflCoord.y));
if ( floor(reflCoord.y) / 2.0 == 0.0)
{
reflCoord.y = 1.0 - reflCoord.y;
}
}
vec4 reflColor = texture2D(uSamplerForeground, reflCoord) ;
if (checkFresnel )
{
reflColor = vec4(1.0,1.0,1.0,1.0);
}
return reflColor.rgb * reflectIntensity;
}
// vec3 reflect1(vec3 n)
// {
// float reflectIntensity = 1.0;
// float s = logIOR;
// vec3 l = vec3(0,0,-1);//eye ray
// vec3 temp = cross (-n, l);
// vec3 Vsurface = cross (temp, -n) ;
// vec3 reflect;
// vec3 origReflect = - 1.0 * vec3(0.0, 0.0, 1.0) + 2.0 * dot(n, vec3(0.0, 0.0, 1.0)) * n;
// if ( s >= 0.0 ) reflect = origReflect * (1.0 - (-s)) + (n) * (-s);
// if ( s < 0.0 ) reflect = origReflect * (1.0 - (s) ) + Vsurface * ( s);
// vec2 reflCoord = f_texcoord + (reflect.xy / reflect.z) * FGdis + vec2( -mouseXYcopy[0].x * 0.5, mouseXYcopy[0].y * 0.5) ;//+ vLight0.xy ;
// vec2 v = (reflCoord - vec2(0.5, 0.5)) / 0.5;
// reflCoord.x = v.x * ( 1.0 - FGscaleX ) - FGshiftX + 0.5;
// reflCoord.y = v.y * ( 1.0 - FGscaleY ) - FGshiftY + 0.5;
// if (reflCoord.x > 1.0 || reflCoord.x < 0.0)
// {
// reflCoord.x = reflCoord.x - float(floor(reflCoord.x));
// if ( floor(reflCoord.x) / 2.0 == 0.0)
// {
// reflCoord.x = 1.0 - reflCoord.x;
// }
// }
// if (reflCoord.y > 1.0 || reflCoord.y < 0.0)
// {
// reflCoord.y = reflCoord.y - float(floor(reflCoord.y));
// if ( floor(reflCoord.y) / 2.0 == 0.0)
// {
// reflCoord.y = 1.0 - reflCoord.y;
// }
// }
// vec4 reflColor = texture2D(uSamplerForeground, reflCoord) ;
// if (checkFresnel )
// {
// reflColor = vec4(1.0,1.0,1.0,1.0);
// }
// return reflColor.rgb * reflectIntensity;
// }
// Reflected texture is treated as if it is on a hemisphere 1 unit
// away from the surface.
vec3 reflect2(vec3 n)
{
float reflectIntensity = 1.0;
vec2 reflCoord = f_texcoord + n.xy/n.z * FGdis + vec2( -mouseXYcopy.x * 0.5, mouseXYcopy.y * 0.5);
vec2 v = (reflCoord - vec2(0.5, 0.5)) / 0.5;
reflCoord.x = v.x * ( 1.0 - FGscaleX ) - FGshiftX +0.5;
reflCoord.y = v.y * ( 1.0 - FGscaleY ) - FGshiftY + 0.5;
if (reflCoord.x > 1.0 || reflCoord.x < 0.0)
{
reflCoord.x = reflCoord.x - float(floor(reflCoord.x));
if ( floor(reflCoord.x) / 2.0 == 0.0)
{
reflCoord.x = 1.0 - reflCoord.x;
}
}
if (reflCoord.y > 1.0 || reflCoord.y < 0.0)
{
reflCoord.y = reflCoord.y - float(floor(reflCoord.y));
if ( floor(reflCoord.y) / 2.0 == 0.0)
{
reflCoord.y = 1.0 - reflCoord.y;
}
}
vec4 reflColor = texture2D(uSamplerForeground, reflCoord) ;
if (checkFresnel)
{
reflColor = vec4(1.0,1.0,1.0,1.0);
}
return reflColor.rgb * reflectIntensity;
}
vec3 refract2(vec3 n) // Photorealistic equation
{
float refractIntensity = 1.0;
float ior = pow(2.0, logIOR);
float cos1 = dot(n, vec3(0, 0, 1.0)); //vLight
float cos2 = sqrt(1.0 + ior * ior * ( (cos1 * cos1) - 1.0 ));
vec3 refract = -1.0 * ior * vec3(0, 0, 1.0) + (ior * cos1 - cos2) * n; // vec3(0,0,1) -> vLight
vec2 refrCoord = f_texcoord + (refract.xy / refract.z ) * (2.0 * BGdis);
vec4 refrColor = texture2D(uSamplerBackground, refrCoord);
if (checkFresnel == true)
{
refrColor = vec4(0,0,0,1.0);
}
return refrColor.rgb * refractIntensity;
}
vec3 refract(vec3 n) // Ergun's way
{
float refractIntensity = 1.0;
float s = logIOR;
vec3 l = vec3(0,0,-1);//eye ray
vec3 temp = cross (-n, l);
vec3 Vsurface = cross (temp, -n) ;
vec3 refract;
if ( s > 0.0 ) refract = l * (1.0 - (-s)) + (-n) * (-s);
if ( s < 0.0 ) refract = l * (1.0 - (s) ) + Vsurface * ( s);
vec2 refrCoord = f_texcoord + (refract.xy / refract.z ) * (2.0 * BGdis);
vec4 refrColor = texture2D(uSamplerBackground, refrCoord);
if (checkFresnel == true)
{
refrColor = vec4(0,0,0,1.0);
}
return refrColor.rgb * refractIntensity;
}
vec3 fresnelBlend(vec3 n, vec3 refl, vec3 refr)
{
float cos = dot(n, vec3(0, 0, 1.0) );
float N = (logIOR + 1.0) / 2.0;
float Amin = 0.02,
Amax = 0.3;
float Cmin = 0.4,
Cmax = 1.0;
float A = Amin * ( 1.0 - N ) + Amax * N;
float B = 0.0;
float C = Cmin * ( 1.0 - N ) + Cmax * N;
float D = 1.0;
float num1 = sqrt( 1.0 - fresnelB * fresnelB );
float num2 = sqrt( 1.0 - fresnelC * fresnelC );
// float num1 = fresnelC ;
// float num2 = fresnelB ;
float fresnel;
float F;
if ( 1.0 > cos && cos > num1 ) {
F = ( cos - num1 ) / ( 1.0 - num1 );
fresnel = A * F + B * ( 1.0 - F ) ;
}else if ( num1 > cos && cos > num2 ){
F = ( cos - num2 ) / ( num1 - num2 );
fresnel = B * F + C * ( 1.0 - F );
}else if ( num2 > cos && cos > 0.0){
F = ( cos - 0.0 ) / ( num2 - 0.0 );
fresnel = C * F + D * ( 1.0 - F );
}
if (fresnelIntensity > 0.0){
fresnel = 1.0 * fresnelIntensity + fresnel * ( 1.0 - fresnelIntensity);
return refl * fresnel + refr * ( 1.0 - fresnel );
}else{
fresnel = fresnel * (1.0 + fresnelIntensity);
return refl * fresnel + refr * ( 1.0 - fresnel );
}
//vec3 reflTemp = refl * reflectIntensity ;
//vec3 refrTemp = refr * (1.0 - reflectIntensity);
//return reflTemp * (1.0 - cos) + refrTemp * cos;
}
void main()
{
vec4 nn = normal();
vec3 n = nn.xyz;
//vec3 specular = spec(n);
vec4 diffuse = diffuse(n);//+ vec4(specular, 1.0);
vec3 specular = spec(n);
vec3 alphaControl = alphaControl();
vec4 background = texture2D(uSamplerBackground, vec2(f_texcoord.s, f_texcoord.t) );
vec3 backgroundColor = background.rgb;
vec3 refl = vec3 (0,0,0);
if (reflMap == 1)
{
refl = reflect1(n) + specular; //plane
if (checkFresnel){refl = reflect1(n);}
}else if (reflMap == 2)
{
refl = reflect2(n) + specular; //hemisphere
if (checkFresnel){refl = reflect2(n);}
}
vec3 refr = refract(n);
vec3 fresnel = fresnelBlend(n, refl, refr);
vec4 finalColor = diffuse;
//finalColor += vec4(specular, 1.0);
vec4 finalColor_showLightsOnly = finalColor;
float alpha = diffuse.a;
float a;
a = alphaControl.r;
alpha = alpha * (1.0 - a) + alpha * alphaR * a;
a = alphaControl.g;
alpha = alpha * (1.0 - a) + alpha * alphaG * a;
a = alphaControl.b;
alpha = alpha * (1.0 - a) + alpha * alphaB * a;
finalColor = vec4 (fresnel * (1.0 - alpha) + finalColor.rgb * alpha, 1.0) ;
a = nn.a ;
vec3 compBackground = backgroundColor * (1.0 - a) + finalColor.rgb * a;
if (checkFresnel )
{
finalColor = vec4 (fresnel, 1.0);
}
if (lightsOnly )
{
finalColor = vec4(finalColor_showLightsOnly.rgb, 1.0);
compBackground = vec3(0,0,0) * (1.0 - a) + finalColor.rgb * a;
}
gl_FragColor = vec4(compBackground.rgb, 1.0);
//gl_FragColor = vec4(diffuse.a,diffuse.a,diffuse.a, 1.0);
//gl_FragColor = vec4(userMouse.x+0.5, -userMouse.y+0.5, 0.0, 1.0);
//gl_FragColor = vec4(f_texcoord.x, 1.0-f_texcoord.y, 0.0, 1.0);
/*
vec2 v0 = f_texcoord - mouseXY0;
vec3 NewNormal;
NewNormal = vec3(v0.xy, sqrt(1.0 - length(v0)/(0.1*0.1)));
vec3 Newrefr = refract(NewNormal);
gl_FragColor = vec4(refr,1.0);
*/
/*
vec3 diffuse = diffuse(n).rgb;
vec3 specular = spec(n);
vec3 refl = reflect(n);
vec3 refr = refract(n);
vec3 fresnel = fresnelBlend(n, refl, refr);
gl_FragColor = vec4(diffuse + specular + 0.5 * fresnel, 1.0);
*/
}
</script>
<script type="text/javascript" src="js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="resources/webgl-utils.js"></script>
<script type="text/javascript" src="resources/initShaders.js"></script>
<script type="text/javascript" src="resources/MV.js"></script>
</head>
<body>
<!--nav-->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Mock3D</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Project</a></li>
<li><a href="#">Papers</a></li>
<li><a href="#">Download</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
</div>
</nav>
<!--content-->
<div class="container-fluid">
<div class="row row-offcanvas row-offcanvas-left">
<!--Left Column start-->
<div class="col-sm-2 sidebar sidebar-left sidebar-offcanvas">
<div class="main_button_container">
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Homer</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Picasso</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Bubble</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Bottle</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Eye</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">EscherSphere</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">UnderWater</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">FragFace</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Impossible1</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Impossible2</button>
</div>
<div class="main_button">
<button class ="btn btn-block btn-mycustom">Impossible3</button>
</div>
<div class="clearfix"></div>
</div>
<ul class="myAccordion" id = "accordion_L">
<!--Basic Images-->
<li class="panel">
<a class="myControlTitle" data-toggle= "collapse" data-parent= "#accordion_L" href="#basicImages" >
Basic Images
</a>
<div id = "basicImages" class= "inCollapse collapse in" >
<div class = "imgbox_container">
<h6>Shape Image</h6>
<div>
<div id = "container3" class="imgThumb_container">
<div class="btn-file">
<input type="file" id = "inputFileToLoad3" >
</div>
<div id = "container3image" class="imgThumb">
</div>
</div>
</div>
</div>
<div class = "imgbox_container">
<h6>Bright Image</h6>
<div>
<div id = "container2" class="imgThumb_container">
<div class="btn-file">
<input type="file" id = "inputFileToLoad2" >
</div>
<div id = "container2image" class="imgThumb">
</div>
</div>
</div>
</div>
<div class = "imgbox_container">
<h6>Dark Image</h6>
<div>
<div id = "container1" class="imgThumb_container">
<div class="btn-file">
<input type="file" id = "inputFileToLoad1" >
</div>
<div id = "container1image" class="imgThumb"> </div>
</div>
</div>
</div>
<div>
<h6>Style Control</h6>
<div class="slider_box">
<input id="styleControl_slider" data-slider-id='customSlider' type="text" class=" span2" value="" />
</div>
<div >
<div class = "h7 inlineBlock">Bright</div>
<div class = "h7 pull-right">Dark</div>
</div>
</div>
</div>
</li>
</ul>
</div>
<!--Left Column end-->
<!--Main Canvas start-->
<div class="col-sm-8 main">
<!--
<p class="pull-left visible-xs">
<button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">Toggle nav</button>
</p>
-->
<!--
<img src="img/solidColor.jpg" class="img-responsive" alt="our canvas">
-->
<div class="canvas_container">
<canvas id="gl-canvas" >
Oops ... your browser doesn't support the HTML5 canvas element
</canvas>
<svg id = "lightPosition_container" xmlns = " http://www.w3.org/2000/svg" >
</svg>
</div>
</div>
<!--Main Canvas end-->
<!--Right column start-->
<div class="col-sm-2 sidebar sidebar-right">
<ul class="myAccordion" id = "accordion_R">
<!--Light-->
<li class="panel">
<a class = "myControlTitle collapsed" data-toggle= "collapse" data-parent= "#accordion_R" href="#lightControl">
Light
</a>
<div id = "lightControl" class= "inCollapse collapse" >
<div class = "checkbox">
<label>
<span class="h6 inlineBlock" >Show Lights Position</span>
<div class = "checkbox_container pull-right">
<input type="checkbox" id ="lightsPositionSelect" >
<div class = "pseudoCheckbox"></div>
</div>
</label>
</div>
<div class = "checkbox">
<label>
<span class="h6 inlineBlock" >Show Lights Only</span>
<div class = "checkbox_container pull-right">
<input type="checkbox" id = "lightsOnlySelect">
<div class = "pseudoCheckbox"></div>
</div>
</label>
</div>
<!-- <div class="btn_container btn-addLight">
<input type = "submit" class ="btn btn-default btn-block " value="Add Light">
</div> -->
<div class="btn_container">
<button class ="btn btn-block" id = "btn_addLight" >ADD LIGHT</button>
</div>
<div id = "lights_container">
<ul class="myAccordion" id = "accordion_Lights">
</ul>
</div>
</div>
</li>
<!--Shadow-->
<!-- <li class="panel">
<a class = "myControlTitle collapsed" data-toggle="collapse" data-parent = "#accordion_R" href="#shadow">Shadow<span class="sr-only">(current)</span></a>
<div id = "shadow" class= "inCollapse collapse">
<div class="checkbox">
<label>
<span class = "h6 inlineBlock"> Show Shadow </span>
<div class = "checkbox_container pull-right">
<input type="checkbox">
<div class = "pseudoCheckbox"></div>
</div>
</label>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Sample size </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="sha_sampleSize_val" value="1">
</div>
<div class="slider_box">
<input id="sha_sampleSize_slider" data-slider-id='customSlider' type="text"/>
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Number of Sample </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="sha_numberOfSample_val" value="1">
</div>
<div class="slider_box">
<input id="sha_numberOfSample_slider" data-slider-id='customSlider' type="text"/>
</div>
</div>
</div>
</li> -->
<!--Additional Alpha Control-->
<li class="panel">
<a class="myControlTitle collapsed" data-toggle="collapse" data-parent = "#accordion_R" href="#alphaControl">
Diffuse Alpha
</a>
<div id = "alphaControl" class= "inCollapse collapse">
<div class="imgbox_container">
<h6>Alpha Image</h6>
<div>
<div id = "container6" class="imgThumb_container" >
<div class="btn-file">
<input type="file" id = "inputFileToLoad6" >
</div>
<div id = "container6image" class="imgThumb"> </div>
</div>
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Alpha in Red </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="alphaInRed_val">
</div>
<div class="slider_box">
<input id="alphaInRed_slider" data-slider-id='customSlider' type="text"/>
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Alpha in Green </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="alphaInGreen_val">
</div>
<div class="slider_box">
<input id="alphaInGreen_slider" data-slider-id='customSlider' type="text"/>
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Alpha in Blue </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="alphaInBlue_val">
</div>
<div class="slider_box">
<input id="alphaInBlue_slider" data-slider-id='customSlider' type="text"/>
</div>
</div>
</div>
</li>
<!--Refraction-->
<li class="panel">
<a class="myControlTitle collapsed" data-toggle="collapse" data-parent = "#accordion_R" href="#refractionControl">
Refraction
</a>
<div id = "refractionControl" class= "inCollapse collapse">
<div class="imgbox_container">
<h6>Background image</h6>
<div>
<div id = "container5" class="imgThumb_container" >
<div class="btn-file">
<input type="file" id = "inputFileToLoad5" >
</div>
<div id = "container5image" class="imgThumb"> </div>
</div>
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Refraction </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="refraction_val">
</div>
<div class="slider_box">
<input id="refraction_slider" data-slider-id='customSlider' type="text" />
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> BG Distance </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="refr_BGdis_val">
</div>
<div class="slider_box">
<input id="refr_BGdis_slider" data-slider-id='customSlider' type="text" />
</div>
</div>
<div class = "fresnel_container">
<div class = "fresnelPanel">
<div class = "myFresnelTitle">
FRESNEL
</div>
<div class = "fresnelBox">
<div class="checkbox">
<label>
<span class = "h6 inlineBlock"> Check Fresnel </span>
<div class = "checkbox_container pull-right">
<input type="checkbox" id ="checkFresnelSelect">
<div class = "pseudoCheckbox"></div>
</div>
</label>
</div>
<div >
<span class="h6 inlineBlock"> Fresnel Control </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="fresnel_intensity_val">
</div>
<div class="slider_box">
<input id="fresnel_intensity_slider" data-slider-id='customSlider' type="text" />
</div>
<div>
<div class = "h7 inlineBlock">Full Refract</div>
<div class = "h7 pull-right">Full Reflect</div>
</div>
</div>
<div>
<h6>Fresnel Position</h6>
<div class="slider_box">
<input id="fresnelControl_slider" data-slider-id='customSlider' type="text" class=" span2" value="" />
</div>
<div>
<div class = "h7 inlineBlock">Center</div>
<div class = "h7 pull-right">Edge</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="slider_container">
<span class="h6 inlineBlock"> Translucency </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="translucency_val" value="1">
</div>
<div class="slider_box">
<input id="translucency_slider" data-slider-id='customSlider' type="text"/>
</div>
</div> -->
</div>
</li>
<!--Reflection-->
<li class="panel">
<a class="myControlTitle collapsed" data-toggle="collapse" data-parent = "#accordion_R" href="#reflectionControl">
Reflection
</a>
<div id = "reflectionControl" class= "inCollapse collapse">
<div class="imgbox_container">
<h6>Foreground image</h6>
<div>
<div id = "container4" class="imgThumb_container">
<div class="btn-file">
<input type="file" id = "inputFileToLoad4" >
</div>
<div id = "container4image" class="imgThumb"> </div>
</div>
</div>
</div>
<div class="dropdown_container">
<span class="h6 inlineBlock"> Map as </span>
<div class="pull-right">
<div class="btn-group" id = "reflMap">
<button type="button" class="btn btn-default dropdown-toggle myDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a id = "reflMap_plane">Plane</a></li>
<li><a id = "reflMap_hemisphere">Hemisphere</a></li>
</ul>
</div>
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Shift X</span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="refl_FGshiftX_val">
</div>
<div class="slider_box">
<input id="refl_FGshiftX_slider" data-slider-id='customSlider' type="text" />
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Shift Y</span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="refl_FGshiftY_val">
</div>
<div class="slider_box">
<input id="refl_FGshiftY_slider" data-slider-id='customSlider' type="text" />
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Scale X</span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="refl_FGscaleX_val">
</div>
<div class="slider_box">
<input id="refl_FGscaleX_slider" data-slider-id='customSlider' type="text" />
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Scale Y</span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="refl_FGscaleY_val">
</div>
<div class="slider_box">
<input id="refl_FGscaleY_slider" data-slider-id='customSlider' type="text" />
</div>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> FG Distance </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="refl_FGdis_val">
</div>
<div class="slider_box">
<input id="refl_FGdis_slider" data-slider-id='customSlider' type="text" />
</div>
</div>
<!-- <div class="slider_container">
<span class="h6 inlineBlock"> Bluriness </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="bluriness_val" value="1">
</div>
<div class="slider_box">
<input id="bluriness_slider" data-slider-id='customSlider' type="text"/>
</div>
</div> -->
</div>
</li>
<!--Ambient Occlusion-->
<!-- <li class="panel">
<a class = "myControlTitle collapsed" data-toggle="collapse" data-parent = "#accordion_R" href="#aoControl">
Ambient Occlusion
</a>
<div id = "aoControl" class= "inCollapse collapse">
<div class="checkbox">
<label>
<span class = "h6 inlineBlock"> Show Ambient </span>
<div class = "checkbox_container pull-right">
<input type="checkbox">
<div class = "pseudoCheckbox"></div>
</div>
</label>
</div>
<div class="slider_container">
<span class="h6 inlineBlock"> Sample size </span>
<div class="pull-right">
<input type="text" class="form-control mytextbox text-center" id="amb_sampleSize_val" value="1">
</div>
<div class="slider_box">
<input id="amb_sampleSize_slider" data-slider-id='customSlider' type="text"/>
</div>
</div>
<div class="slider_container">