blob: 9f73dd3c7d87f28dd1423d184d70138e6139cb5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
([1]import* glsl-view time string)
([2]import osc)
([4]def *oscout* ([3]osc/connect 'localhost' 9000))
([10]defn testpat [w h uv]
([9]do
([7]def source ([6]stream-source '2D' ([5]str 'testsrc=size=' w 'x' h ':rate=30') 'lavfi'))
$[8]shader"texture($source, round($uv * vec2($w, $h)) / vec2($w, $h)).rgb"))
([14]draw
$[13]shader"
in vec2 uv;
out vec4 color;
void main() {
vec3 hi = $([11]testpat 1280 720 "uv");
vec3 lo = $([17]testpat 16 9 "uv");
color.rgb = mix(hi, lo, $([12]lfo 1));
color.a = 1.0;
}")
|