-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBernstein3.st
More file actions
53 lines (44 loc) · 846 Bytes
/
Copy pathBernstein3.st
File metadata and controls
53 lines (44 loc) · 846 Bytes
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
filter v -> getCian() {
return vec4(0.0, v[UV].y, v[UV].z, v[UV].w);
}
filter v -> getRed() {
return vec4(v[UV].x, 0.0, 0.0, v[UV].w);
}
filter red, cian -> deinterlace(float x, float y) {
vec2 rp = vec2(UV.x-x, UV.y-y);
vec2 cp = vec2(UV.x+x, UV.y+y);
return red[rp]+cian[cp];
}
function main() {
FIRST:
video v = video("beethoven.mp4");
audio a = audio("Kick.mp3");
float x = 0.0;
float y = 0.0;
decay(x,0.0025) from now until INFINITY;
decay(y,0.0025) from now until INFINITY;
a.loop();
v.play();
node pre;
node cian;
node red;
LOOP:
if(v.time() > 1.0) {
v.jump(0.8);
a.stop();
a.play();
x = 0.01;
y = 0.01;
}
v -> pre;
pre -> getCian() -> cian;
pre -> getRed() -> red;
red,cian -> deinterlace(x,y) -> output;
}
function decay(float a, float rate) {
LOOP:
a = a - rate;
if(a < 0.0) {
a = 0.0;
}
}