-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
38 lines (36 loc) · 1.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
<link rel="icon" type="image" href="/favicon.ico" />
<title>Rohan Singh</title>
<link rel="stylesheet" href="./src/style.css" />
</head>
<body>
<div id="container"></div>
<div id="container2"></div>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script id="webgl" type="module" src="/src/indexForge.js"></script>
<script id="webgl2" type="module" src="/src/indexFactory.js"></script>
<!-- Shaders -->
<script type="x-shader/x-vertex" id="vertexshader">
attribute float displacement;
uniform vec3 vLut[256];
varying vec3 vColor;
void main(){
int index = int(displacement);
vColor = vLut[index];
vec3 newPosition = position + normal*displacement/15.5;
gl_Position = projectionMatrix * modelViewMatrix * vec4(newPosition,1.0);
}
</script>
<script type="x-shader/x-fragment" id="fragmentshader">
varying vec3 vColor;
void main(){
gl_FragColor = vec4(vColor,1.0);
}
</script>
</body>
</html>