-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (42 loc) · 852 Bytes
/
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
<!doctype html>
<head>
<meta charset="utf-8">
<title>PixiJS + </title>
</head>
<script src="js/pixi.min.js"></script>
<style>
* {
padding: 0;
margin: 0;
text-align: center;
}
#container {
width: 90%;
}
button {
margin-bottom: 5px;
margin-left: 5px;
}
</style>
<body>
<div id="conatiner">
<h1>PixiJS +</h1>
<h2>Shader</h2>
<div id="canvas"></div>
</div>
<script id="shader" type="shader">
// void main(){
// gl_FragColor = vec4(gl_FragCoord.x/1000.0, 0.0, 0.0, 0.5);
// }
precision mediump float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void) {
vec4 color = texture2D(uSampler, vTextureCoord);
color.r = 0.5;
gl_FragColor = color;
}
</script>
<script src="./src/main.js"></script>
</body>
</html>