/
config.xml
144 lines (144 loc) · 3.75 KB
/
config.xml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<web>http://www.patriciogonzalezvivo.com</web>
<general>
<fullscreen>0</fullscreen>
<width>640</width>
<height>480</height>
</general>
<surface>
<id>0</id>
<type>ofxGLEditor</type>
<path>none</path>
<visible>0</visible>
<texture>
<point>
<x>36.4827</x>
<y>547.362</y>
</point>
<point>
<x>713.935</x>
<y>548.331</y>
</point>
<point>
<x>714.652</x>
<y>40.2088</y>
</point>
<point>
<x>37.1894</x>
<y>39.2807</y>
</point>
</texture>
<mask>
<point>
<x>0</x>
<y>0</y>
</point>
<point>
<x>1</x>
<y>0</y>
</point>
<point>
<x>1</x>
<y>1</y>
</point>
<point>
<x>0</x>
<y>1</y>
</point>
</mask>
<out>
<active>1</active>
</out>
</surface>
<surface>
<id>1</id>
<type>ofVideoGrabber</type>
<path>0</path>
<visible>1</visible>
<texture>
<point>
<x>42.4797</x>
<y>587.36</y>
</point>
<point>
<x>228.504</x>
<y>587.36</y>
</point>
<point>
<x>228.504</x>
<y>726.878</y>
</point>
<point>
<x>42.4799</x>
<y>726.878</y>
</point>
</texture>
<mask>
<point>
<x>0</x>
<y>0</y>
</point>
<point>
<x>1</x>
<y>0</y>
</point>
<point>
<x>1</x>
<y>1</y>
</point>
<point>
<x>0</x>
<y>1</y>
</point>
</mask>
<out>
<active>1</active>
</out>
</surface>
<surface>
<id>2</id>
<type>ofShader</type>
<path>/Users/Patricio/Dropbox/Public/GPU-toolbox/pattern1.fs</path>
<visible>1</visible>
<frag>uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;

uniform sampler2DRect backbuffer; // Previus frame for PingPong

uniform sampler2DRect tex0; // First dot on the left of the patch
uniform sampler2DRect tex1; // Second dot on the left of the patch

const float pi = 3.1415926;

void main(void){
 vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / resolution.xy;
 p.y *= resolution.y/resolution.x;
 p *= 30.0;
 const float tot = pi*2.0;
 const float n = 9.0;
 const float df = tot/n;
 float c = 0.0;
 float t = time*2.0;

 for (float phi =0.0; phi < tot; phi+=df){
 c+=cos(cos(phi)*p.x+sin(phi)*p.y +t);
 }
 
 vec2 st = gl_FragCoord.xy;

 //vec4 A = texture2DRect(tex0, st);
 vec4 A = vec4(1.0,1.0,1.0,1.0);
 //vec4 B = texture2DRect(tex1, st);
 vec4 B = vec4(0.0,0.0,0.0,1.0);

 gl_FragColor = mix(A,B,c);
}


</frag>
<format>6408</format>
<passes>1</passes>
<texture>
<point>
<x>298.545</x>
<y>584.576</y>
</point>
<point>
<x>488.034</x>
<y>584.573</y>
</point>
<point>
<x>488.035</x>
<y>726.691</y>
</point>
<point>
<x>298.546</x>
<y>726.692</y>
</point>
</texture>
<mask>
<point>
<x>0</x>
<y>0</y>
</point>
<point>
<x>1</x>
<y>0</y>
</point>
<point>
<x>1</x>
<y>1</y>
</point>
<point>
<x>0</x>
<y>1</y>
</point>
</mask>
<out>
<active>1</active>
</out>
</surface>