-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.html
71 lines (67 loc) · 2.06 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.content {
max-width: 960px;
margin: auto;
}
h1,
h2,
h3,
p {
font-family: Helvetica, sans-serif;
}
code {
font-weight: bolder;
white-space: pre-line;
color: white;
background-color: black;
}
em {
color: #ff0000;
font-style: normal;
}
#mergercode {
background-color: white;
color: black;
}
</style>
<meta charset="UTF-8" />
</head>
<body>
<div class="content">
<h1 id="title"></h1>
<p>
merge-pass is a package that lets you easily create post-processing
effects without a lot of graphics knowledge. you specify a list of
effects and merge-pass will create a single shader or a tree of shaders.
it will manage texture swaps and program switching for you; all you need
to do is give a high-level description of the effect. if you use
typescript, there's a very good chance the shaders will compile if your
typescript compiles. however, you can totally use this with just
javascript as well. here's the
<a href="https://github.com/bandaloo/merge-pass">repo</a> and here's the
<a href="https://www.npmjs.com/package/@bandaloo/merge-pass">package</a>
on npm
</p>
<p><a id="link" href="">random demo</a></p>
<div id="note"></div>
<h2>processed output</h2>
<canvas id="gl" width="960" height="540"></canvas>
<h2>unprocessed input</h2>
<canvas id="source" width="960" height="540"></canvas>
<div id="buffers" style="margin: 0;"></div>
<h2>code</h2>
<p>
this function returns an object containing the merger and a function
that changes uniforms on every step. the important code that defines the
actual effect is in <em>red</em>
</p>
<code id="mergercode"></code>
<h2>other demos</h2>
<p id="demos"></p>
</div>
</body>
<script src="bundle.js"></script>
</html>