-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
49 lines (48 loc) · 1.58 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
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VR</title>
<style>
body{
overflow: hidden;
}
video{
visibility: hidden;
position: absolute;
}
</style>
</head>
<body>
<video id = "video" src="./assets/video/Donning and Doffing PPE.mp4" preload="auto" playsinline webkit-playsinline loop></video>
<!--Shader Code-->
<script id="vertexShader" type="x-shader/x-vertex">
uniform vec3 viewVector;
uniform float base;
uniform float p;
varying float intensity;
void main()
{
vec3 vNormal = normalize( normalMatrix * normal );
vec3 vNormel = normalize( normalMatrix * viewVector );
intensity = pow( base - dot(vNormal, vNormel), p );
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
</script>
<script id="fragmentShader" type="x-shader/x-vertex">
uniform vec3 glowColor;
varying float intensity;
void main()
{
vec3 glow = glowColor * intensity;
gl_FragColor = vec4( glow, 1.0 );
}
</script>
<!--Main Script-->
<script src="./build/bundle.js"></script>
</body>
</html>