-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·48 lines (37 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
<!DOCTYPE html>
<!-- saved from url = (0040)http://www.yovid.es/pixi-test/esferizar/ -->
<html><head><meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
<title>prueba 1</title>
<script type = "text/javascript" src = "shader_code/MultipleCallbacks.js"></script>
<script type = "text/javascript" src = "shader_code/pixi6.js"></script>
<!-- <script type = "text/javascript" src = "shader_code/normalmapfilter.js"></script> -->
<script type = "text/javascript" src = "shader_code/shader.js"></script>
<style type = "text/css"></style>
<script id = "shader-fs" type = "text/javascript" src="./shader.frag.js"></script>
<script id = "shader-vs" type = "x-shader/x-vertex">
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = aVertexPosition;
}
</script>
</head>
<body>
<script type = "text/javascript" src = "shader_code/webgl.js"></script>
<div><script type = "text/javascript">WebGLPlanet();</script></div>
</body></html>