-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
120 lines (91 loc) · 3.68 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - materials - anisotropic texture filtering</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
color: #000;
font-family:Monospace;
font-size:13px;
text-align:center;
background-color: rgb(50,50,50);
margin: 0px;
padding: 0px;
overflow: hidden;
}
#info {
position: absolute;
top: 0px; width: 100%;
padding: 5px;
z-index:100;
}
.lbl { color:#fff; font-size:16px; font-weight:bold; position: absolute; bottom:0px; z-index:100; text-shadow:#000 1px 1px 1px; background-color:rgba(0,0,0,0.85); padding:1em }
#lbl_left { text-align:left; left:0px }
#lbl_right { text-align:left; right:0px }
.g { color:#aaa }
.c { color:#fa0 }
a { color:red }
#stats { position: absolute; top:0; left: 0 }
#stats #fps { background: transparent !important }
#stats #fps #fpsText { color: #777 !important }
#stats #fps #fpsGraph { display: none }
</style>
</head>
<body>
<div id="info">
<a> Dark World </a>
</div>
<div id="lbl_left" class="lbl">
anisotropy: <span class="c" id="val_left"></span><br/>
</div>
<script id="vertexShader" type="x-shader/x-vertex">
varying vec2 vUv;
//varying vec4 v_color;
void main() {
vUv = uv;
//v_color = vec4(0.0, 0.0, 1.0, 0.1);
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
}
</script>
<script id="fragment_shader" type="x-shader/x-fragment">
uniform vec2 uOffset;
uniform sampler2D tDiffuse;
uniform float opacity;
uniform vec3 fogColor;
uniform float fogNear;
uniform float fogFar;
varying vec2 vUv;
vec2 uRepeatOverlay = vec2( 32, 32);
void main() {
gl_FragColor = texture2D( tDiffuse, uRepeatOverlay * vUv + uOffset);
float depth = gl_FragCoord.z / gl_FragCoord.w;
float fogFactor = smoothstep( fogNear, fogFar, depth );
gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );
gl_FragColor.w = opacity;
//gl_FragColor = vec4(vec3( 1.0 ), 0.1); // RGBA
//gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0); // RGBA
//gl_FragColor.w = 0.1;
}
</script>
<script src="libs/three.js"></script>
<script src="libs/Detector.js"></script>
<script src="libs/stats.min.js"></script>
<script src="controls.js"></script>
<script src="terrain.js"></script>
<script src="pointlight.js"></script>
<script src="laser.js"></script>
<script src="utils.js"></script>
<script src="scaner.js"></script>
<script src="libs/ConvolutionShader.js"></script>
<script src="libs/CopyShader.js"></script>
<script src="libs/FXAAShader.js"></script>
<script src="libs/EffectComposer.js"></script>
<script src="libs/MaskPass.js"></script>
<script src="libs/RenderPass.js"></script>
<script src="libs/ShaderPass.js"></script>
<script src="libs/BloomPass.js"></script>
<script src="init.js"></script>
</body>
</html>