/
11 - Shaders.v4p
549 lines (549 loc) · 30.1 KB
/
11 - Shaders.v4p
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
<!DOCTYPE PATCH SYSTEM "http://vvvv.org/versions/vvvv45beta26.dtd" >
<PATCH nodename="C:\kimchiandchips\Workshops\VVVV.Tutorials.Fundamentals\11 - Shaders.v4p" filename="C:\kimchiandchips\Workshops\VVVV.Tutorials.Fundamentals\9. DirectX 2.v4p" locked="0" systemname="9. DirectX 2">
<BOUNDS height="13725" left="5310" top="600" type="Window" width="16800">
</BOUNDS>
<NODE componentmode="InABox" id="0" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="225" top="150" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="1095" left="225" top="150" type="Box" width="7665">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|11. Shaders|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="1">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="42">
</PIN>
</NODE>
<NODE componentmode="InABox" id="2" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="105" top="12405" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="750" left="105" top="12405" type="Box" width="5325">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|Created by Elliot Woods.&cr;&lf;Distributed under the MIT license (check file LICENSE) for details.&cr;&lf;Generally you can do whatever you want with these files. have fun!|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="1">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
</NODE>
<NODE componentmode="InABox" id="5" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="5805" top="2640" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="540" left="5805" top="2640" type="Box" width="2085">
</BOUNDS>
<PIN encoded="0" pinname="Input String" visible="1">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="12">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="Author">
</PIN>
</NODE>
<NODE componentmode="InABox" id="6" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="225" top="1260" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="1155" left="225" top="1260" type="Box" width="7665">
</BOUNDS>
<PIN encoded="0" pinname="Input String" visible="1">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="12">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="Description">
</PIN>
</NODE>
<INFO author="Elliot Woods" description="Introduction to shaders, how to hook them up and whats inside them." tags="Shaders, Mesh">
</INFO>
<NODE componentmode="Hidden" filename="Subpatches\GetMetadata (VVVV).v4p" hiddenwhenlocked="1" id="10" nodename="GetMetadata (VVVV)" systemname="GetMetadata (VVVV)">
<BOUNDS height="100" left="5820" top="1800" type="Node" width="100">
</BOUNDS>
<PIN pinname="Patch" visible="1">
</PIN>
<BOUNDS height="3465" left="14520" top="5520" type="Window" width="4680">
</BOUNDS>
<PIN pinname="Author" visible="1">
</PIN>
<PIN pinname="Description" visible="1">
</PIN>
<PIN pinname="Tags" visible="1">
</PIN>
</NODE>
<NODE componentmode="Hidden" hiddenwhenlocked="1" id="8" nodename="PatchAlias (VVVV)" systemname="PatchAlias (VVVV)">
<BOUNDS height="100" left="5820" top="1350" type="Node" width="100">
</BOUNDS>
<PIN pinname="Patch" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="10" dstpinname="Patch" hiddenwhenlocked="1" srcnodeid="8" srcpinname="Patch">
</LINK>
<LINK dstnodeid="6" dstpinname="Input String" hiddenwhenlocked="1" linkstyle="VHV" srcnodeid="10" srcpinname="Description">
<LINKPOINT x="6445" y="2205">
</LINKPOINT>
<LINKPOINT x="245" y="2355">
</LINKPOINT>
</LINK>
<NODE componentmode="InABox" id="11" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="225" top="2640" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="540" left="225" top="2640" type="Box" width="5520">
</BOUNDS>
<PIN encoded="0" pinname="Input String" visible="1">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="Tags">
</PIN>
</NODE>
<LINK dstnodeid="11" dstpinname="Input String" hiddenwhenlocked="1" linkstyle="VHV" srcnodeid="10" srcpinname="Tags">
<LINKPOINT x="7015" y="2293">
</LINKPOINT>
<LINKPOINT x="275" y="2448">
</LINKPOINT>
</LINK>
<LINK dstnodeid="5" dstpinname="Input String" hiddenwhenlocked="1" srcnodeid="10" srcpinname="Author">
</LINK>
<NODE componentmode="InABox" id="103" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="8145" top="3465" type="Node" width="330">
</BOUNDS>
<BOUNDS height="7515" left="8145" top="3465" type="Box" width="345">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="||">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="1">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
</NODE>
<NODE componentmode="InABox" id="12" nodename="IOBox (String)" systemname="IOBox (String)">
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[0 - What is a shader?]&cr;&lf;&cr;&lf;A <concept>Shader</concept> is an advanced piece of graphics programming which runs on the graphics card. It lets a developer specify in detail how an object should be rendererd to the screen. &cr;&lf;<br />&cr;&lf;&cr;&lf;In VVVV, shaders are commonly called <concept>Effects</concept>, and are represented by a file with extension <b>.fx</b>.&cr;&lf;<br />&cr;&lf;&cr;&lf;The idea of modern shaders was created (afaik) by <b>Pixar</b> as part of their <b>RenderMan</b> rendering package in the late 1980's. Their shaders ran on the CPU and took a long time to calculate for a scene. With the introduction of new graphics cards (Around the time the GeForce FX was released), it became possible to write programs that ran directly on the <concept>GPU</concept> (Graphics Processing Unit).&cr;&lf;<br />&cr;&lf;&cr;&lf;The GPU is capable of calculating lots of small programs in parallel (sometimes hundreds of programs simultanaously). These programs are called shaders and be used to:&cr;&lf;<ul>&cr;&lf;<li><concept>Geometry shader</concept> - Generate geometry</li>&cr;&lf;<li><concept>Tesselation shader</concept> - Increase an object's detail</li>&cr;&lf;<li><concept>Vertex shader</concept> - Manipulate vertices</li>&cr;&lf;<li><concept>Pixel shader</concept> or <concept>Fragment shader</concept> - Control pixel by pixel rendering</li>&cr;&lf;</ul>&cr;&lf;|">
</PIN>
<BOUNDS height="270" left="2760" top="3765" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="375" left="2760" top="3765" type="Box" width="2460">
</BOUNDS>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="InABox" id="230" nodename="IOBox (String)" systemname="IOBox (String)">
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[1 - Basic shader usage]&cr;&lf;&cr;&lf;In VVVV, you apply a <concept>Effect</concept> to a <concept>Mesh</concept>. The shader may accept 1 or more <concept>Texture</concept>s, and will always accept at least 1 <concept>Transform</concept> (this is the <concept>World transform</concept> which is accepted on the generically named <pin>Transform</pin> pin).&cr;&lf;<br />&cr;&lf;&cr;&lf;The most basic shader packaged with VVVV is called <node>Constant (EX9.Effect)</node>. Create one of these now and attach it to a <node>Renderer</node>.&cr;&lf;<br />&cr;&lf;&cr;&lf;The <node>Renderer</node> will remain black, as there is no <concept>Mesh</concept> attached to the shader. There are a number of common meshes built into VVVV:&cr;&lf;<ul>&cr;&lf;<li>Box</li>&cr;&lf;<li>Sphere</li>&cr;&lf;<li>Grid</li>&cr;&lf;<li>Teapot</li>&cr;&lf;<li>Cylinder</li>&cr;&lf;<li>Torus</li>&cr;&lf;</ul>&cr;&lf;&cr;&lf;You can list the availble meshes by searching for <b>EX9.Geometry</b> in the <node>NodeBrowser</node>.&cr;&lf;<br />&cr;&lf;&cr;&lf;Let's attach a <node>Cylinder (EX9.Geometry)</node> to the <pin>Mesh</pin> of the <node>Constant</node> shader node.&cr;&lf;<br />&cr;&lf;&cr;&lf;Because we are looking side on, we see a square. Let's add a <node>Camera</node>, and <node>Group</node> in an <node>AxisAndGrid (DX9)</node> to get some context.&cr;&lf;<br />&cr;&lf;&cr;&lf;Turn on the Antialiasing and Depth Bufffer quality options.&cr;&lf;<br />&cr;&lf;&cr;&lf;We should see a very 'flat' looking cylinder within the scene.|">
</PIN>
<BOUNDS height="270" left="2655" top="4350" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="330" left="2655" top="4350" type="Box" width="2715">
</BOUNDS>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="Hidden" filename="%VVVV%\effects\Constant.fx" id="231" nodename="Constant (EX9.Effect)" systemname="Constant (EX9.Effect)">
<BOUNDS height="100" left="2055" top="6075" type="Node" width="100">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
<PIN pinname="Mesh" visible="1">
</PIN>
<PIN pinname="Texture" visible="1">
</PIN>
<PIN pinname="Texture Transform" visible="1">
</PIN>
</NODE>
<NODE componentmode="InABox" id="232" nodename="Renderer (EX9)" systemname="Renderer (EX9)">
<BOUNDS height="100" left="585" top="6915" type="Node" width="100">
</BOUNDS>
<BOUNDS height="5070" left="585" top="6915" type="Box" width="6900">
</BOUNDS>
<BOUNDS height="5010" left="8145" top="7245" type="Window" width="6240">
</BOUNDS>
<PIN pinname="Layers" visible="1">
</PIN>
<PIN pinname="View" visible="1">
</PIN>
<PIN pinname="Projection" visible="1">
</PIN>
<PIN pinname="Fullscreen Antialiasing Quality Level" slicecount="1" values="3">
</PIN>
<PIN pinname="Windowed Antialiasing Quality Level" slicecount="1" values="3">
</PIN>
<PIN pinname="Windowed Depthbuffer Format" slicecount="1" values="D16">
</PIN>
</NODE>
<NODE componentmode="Hidden" id="234" nodename="Cylinder (EX9.Geometry)" systemname="Cylinder (EX9.Geometry)">
<BOUNDS height="100" left="2235" top="5280" type="Node" width="100">
</BOUNDS>
<PIN pinname="Mesh" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="231" dstpinname="Mesh" srcnodeid="234" srcpinname="Mesh">
</LINK>
<NODE componentmode="Hidden" filename="%VVVV%\modules\vvvv group\Transform\Camera (Transform Softimage).v4p" id="235" nodename="Camera (Transform Softimage)" systemname="Camera (Transform Softimage)">
<BOUNDS height="100" left="5775" top="6420" type="Node" width="100">
</BOUNDS>
<PIN pinname="View" visible="1">
</PIN>
<PIN pinname="Projection" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="232" dstpinname="View" srcnodeid="235" srcpinname="View">
</LINK>
<LINK dstnodeid="232" dstpinname="Projection" srcnodeid="235" srcpinname="Projection">
</LINK>
<NODE componentmode="Hidden" id="236" nodename="Group (EX9)" systemname="Group (EX9)">
<BOUNDS height="270" left="585" top="6495" type="Node" width="2970">
</BOUNDS>
<PIN pinname="Layer 1" visible="1">
</PIN>
<PIN pinname="Layer" visible="1">
</PIN>
<PIN pinname="Layer 2" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="232" dstpinname="Layers" srcnodeid="236" srcpinname="Layer">
</LINK>
<LINK dstnodeid="236" dstpinname="Layer 2" srcnodeid="231" srcpinname="Layer">
</LINK>
<NODE componentmode="Hidden" filename="%VVVV%\modules\vvvv group\EX9\AxisAndGrid (DX9).v4p" id="237" nodename="AxisAndGrid (DX9)" systemname="AxisAndGrid (DX9)">
<BOUNDS height="100" left="570" top="6075" type="Node" width="100">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="236" dstpinname="Layer 1" srcnodeid="237" srcpinname="Layer">
</LINK>
<NODE componentmode="InABox" id="238" nodename="IOBox (String)" systemname="IOBox (String)">
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[2 - Other shaders]&cr;&lf;There's lots of great shaders to make smooth results. Some examples of these are:&cr;&lf;<ul>&cr;&lf;<li>GourandDirectional</li>&cr;&lf;<li>GourandPoint</li>&cr;&lf;<li>PhongDirectional</li>&cr;&lf;<li>PhongPoint</li>&cr;&lf;</ul>&cr;&lf;<br />&cr;&lf;&cr;&lf;And there are many online in the <concept>Contributions</concept> area of the VVVV website.&cr;&lf;<br />&cr;&lf;&cr;&lf;Let's have a look at some now.&cr;&lf;<br />&cr;&lf;&cr;&lf;Copy the patch you just made with the earth cylinder and delete the texture transform (<node>LFO</node> and <node>Translate</node>).&cr;&lf;<br />&cr;&lf;&cr;&lf;Double click <click2/><lmb/> on the <node>Constant</node> node to bring up the <node>NodeBrowser</node>. Select <node>PhongPoint</node>. You will notice that this node has many more input pins, to allow you to change many properties regarding how the shader is drawn.&cr;&lf;<br />&cr;&lf;&cr;&lf;Use the same method to switch the <node>Cylinder</node> mesh with a <node>Sphere (EX9.Geometry)</node>.&cr;&lf;<br />&cr;&lf;&cr;&lf;Create a <node>Translate (Transform Vector)</node> and attach it to the <pin>Transform</pin> of the shader.&cr;&lf;</node>&cr;&lf;&cr;&lf;Attach a <node>RandomSpread</node> to the <pin>XYZ</pin> input of the <node>Translate</node>, and set the <pin>SpreadCount</pin> to <b>30</b> to create 10 3D vectors, i.e. 10 spheres. Set the <pin>Width</pin> of the <node>RandomSpread</node> to <b>5</b>.&cr;&lf;<br />&cr;&lf;&cr;&lf;Now let's animate using a <node>DeNiro</node> and <node>LFO</node> like we did before.&cr;&lf;<br />&cr;&lf;|">
</PIN>
<BOUNDS height="270" left="10710" top="660" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="330" left="10710" top="660" type="Box" width="2085">
</BOUNDS>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="Hidden" id="239" nodename="FileTexture (EX9.Texture)" systemname="FileTexture (EX9.Texture)">
<BOUNDS height="100" left="3570" top="5265" type="Node" width="100">
</BOUNDS>
<PIN pinname="Texture Out" visible="1">
</PIN>
<PIN encoded="0" pinname="Filename" slicecount="1" values="..\..\..\vvvv\vvvv_45beta26\girlpower\images\earth_512x512.jpg">
</PIN>
</NODE>
<LINK dstnodeid="231" dstpinname="Texture" linkstyle="VHV" srcnodeid="239" srcpinname="Texture Out">
<LINKPOINT x="3655" y="5728">
</LINKPOINT>
<LINKPOINT x="2825" y="5853">
</LINKPOINT>
</LINK>
<NODE componentmode="InABox" id="240" nodename="IOBox (String)" systemname="IOBox (String)">
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[2 - Texture transforms]&cr;&lf;&cr;&lf;Let's add a texture to the <node>Cylinder</node> using <node>FileTexture</node>. Select the <b>Earth 512x512.jpg</b> image from within the vvvv/girlpower/images folder.&cr;&lf;<br />&cr;&lf;&cr;&lf;Now add a <node>Translate (Transform)</node> and connect it to the <pin>Texture Transform</pin> input pin on the <node>Constant</node> shader. This allows you to move the position of the texture on the object. Try rolling the <pin>X</pin> input value on <node>Translate</node>.&cr;&lf;<br />&cr;&lf;&cr;&lf;Let's add an <node>LFO</node> and connect the <pin>Output</pin> to the <pin>X</pin> pin of the <node>Translate</node>.|">
</PIN>
<BOUNDS height="270" left="4830" top="5595" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="330" left="4830" top="5595" type="Box" width="2715">
</BOUNDS>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="Hidden" id="241" nodename="Translate (Transform)" systemname="Translate (Transform)">
<BOUNDS height="100" left="4635" top="5265" type="Node" width="100">
</BOUNDS>
<PIN pinname="Transform Out" visible="1">
</PIN>
<PIN pinname="X" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="231" dstpinname="Texture Transform" linkstyle="VHV" srcnodeid="241" srcpinname="Transform Out">
<LINKPOINT x="4665" y="5940">
</LINKPOINT>
<LINKPOINT x="3045" y="5940">
</LINKPOINT>
</LINK>
<NODE componentmode="Hidden" id="242" nodename="LFO (Animation)" systemname="LFO (Animation)">
<BOUNDS height="100" left="4890" top="4830" type="Node" width="100">
</BOUNDS>
<PIN pinname="Output" visible="1">
</PIN>
<PIN pinname="Period" slicecount="1" values="5">
</PIN>
</NODE>
<LINK dstnodeid="241" dstpinname="X" srcnodeid="242" srcpinname="Output">
</LINK>
<NODE componentmode="InABox" id="251" nodename="Renderer (EX9)" systemname="Renderer (EX9)">
<BOUNDS height="100" left="9015" top="4290" type="Node" width="100">
</BOUNDS>
<BOUNDS height="5070" left="9015" top="4290" type="Box" width="6900">
</BOUNDS>
<BOUNDS height="5010" left="8145" top="7245" type="Window" width="6240">
</BOUNDS>
<PIN pinname="Layers" visible="1">
</PIN>
<PIN pinname="View" visible="1">
</PIN>
<PIN pinname="Projection" visible="1">
</PIN>
<PIN pinname="Fullscreen Antialiasing Quality Level" slicecount="1" values="3">
</PIN>
<PIN pinname="Windowed Antialiasing Quality Level" slicecount="1" values="3">
</PIN>
<PIN pinname="Windowed Depthbuffer Format" slicecount="1" values="D16">
</PIN>
</NODE>
<NODE componentmode="Hidden" filename="%VVVV%\modules\vvvv group\Transform\Camera (Transform Softimage).v4p" id="249" nodename="Camera (Transform Softimage)" systemname="Camera (Transform Softimage)">
<BOUNDS height="100" left="14205" top="3795" type="Node" width="100">
</BOUNDS>
<PIN pinname="View" visible="1">
</PIN>
<PIN pinname="Projection" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="251" dstpinname="View" srcnodeid="249" srcpinname="View">
</LINK>
<LINK dstnodeid="251" dstpinname="Projection" srcnodeid="249" srcpinname="Projection">
</LINK>
<NODE componentmode="Hidden" id="248" nodename="Group (EX9)" systemname="Group (EX9)">
<BOUNDS height="270" left="9015" top="3870" type="Node" width="2970">
</BOUNDS>
<PIN pinname="Layer 1" visible="1">
</PIN>
<PIN pinname="Layer" visible="1">
</PIN>
<PIN pinname="Layer 2" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="251" dstpinname="Layers" srcnodeid="248" srcpinname="Layer">
</LINK>
<NODE componentmode="Hidden" filename="%VVVV%\modules\vvvv group\EX9\AxisAndGrid (DX9).v4p" id="247" nodename="AxisAndGrid (DX9)" systemname="AxisAndGrid (DX9)">
<BOUNDS height="100" left="9000" top="3450" type="Node" width="100">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="248" dstpinname="Layer 1" srcnodeid="247" srcpinname="Layer">
</LINK>
<NODE componentmode="Hidden" id="246" nodename="FileTexture (EX9.Texture)" systemname="FileTexture (EX9.Texture)">
<BOUNDS height="100" left="13680" top="2925" type="Node" width="100">
</BOUNDS>
<PIN pinname="Texture Out" visible="1">
</PIN>
<PIN encoded="0" pinname="Filename" slicecount="1" values="..\..\..\vvvv\vvvv_45beta26\girlpower\images\earth_512x512.jpg">
</PIN>
</NODE>
<NODE componentmode="Hidden" filename="%VVVV%\effects\PhongPoint.fx" id="252" nodename="PhongPoint (EX9.Effect)" systemname="PhongPoint (EX9.Effect)">
<BOUNDS height="270" left="10485" top="3450" type="Node" width="4860">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
<PIN pinname="Mesh" visible="1">
</PIN>
<PIN pinname="Texture" visible="1">
</PIN>
<PIN pinname="Texture Transform" slicecount="1" visible="1" values="||">
</PIN>
<PIN pinname="Transform" visible="1">
</PIN>
<PIN pinname="Light Position XYZ" slicecount="1" visible="1" values="0,0,0">
</PIN>
</NODE>
<LINK dstnodeid="248" dstpinname="Layer 2" srcnodeid="252" srcpinname="Layer">
</LINK>
<LINK dstnodeid="252" dstpinname="Texture" linkstyle="VHV" srcnodeid="246" srcpinname="Texture Out">
<LINKPOINT x="13205" y="3293">
</LINKPOINT>
<LINKPOINT x="11815" y="3323">
</LINKPOINT>
</LINK>
<NODE componentmode="Hidden" id="250" nodename="Sphere (EX9.Geometry)" systemname="Sphere (EX9.Geometry)">
<BOUNDS height="100" left="10755" top="2955" type="Node" width="100">
</BOUNDS>
<PIN pinname="Mesh" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="252" dstpinname="Mesh" srcnodeid="250" srcpinname="Mesh">
</LINK>
<NODE componentmode="Hidden" id="253" nodename="Translate (Transform Vector)" systemname="Translate (Transform Vector)">
<BOUNDS height="100" left="11010" top="2520" type="Node" width="100">
</BOUNDS>
<PIN pinname="Transform Out" visible="1">
</PIN>
<PIN pinname="XYZ" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="252" dstpinname="Transform" srcnodeid="253" srcpinname="Transform Out">
</LINK>
<NODE componentmode="Hidden" id="254" nodename="RandomSpread (Spreads)" systemname="RandomSpread (Spreads)">
<BOUNDS height="100" left="11745" top="1680" type="Node" width="100">
</BOUNDS>
<PIN pinname="Spread Count" slicecount="1" values="30">
</PIN>
<PIN pinname="Output" visible="1">
</PIN>
<PIN pinname="Width" slicecount="1" values="5">
</PIN>
<PIN pinname="Random Seed" visible="1">
</PIN>
</NODE>
<NODE componentmode="Hidden" id="255" nodename="DeNiro (Animation)" systemname="DeNiro (Animation)">
<BOUNDS height="100" left="11745" top="2070" type="Node" width="100">
</BOUNDS>
<PIN pinname="Go To Position" visible="1">
</PIN>
<PIN pinname="Position Out" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="255" dstpinname="Go To Position" srcnodeid="254" srcpinname="Output">
</LINK>
<LINK dstnodeid="253" dstpinname="XYZ" srcnodeid="255" srcpinname="Position Out">
</LINK>
<NODE componentmode="Hidden" id="256" nodename="LFO (Animation)" systemname="LFO (Animation)">
<BOUNDS height="100" left="11820" top="1200" type="Node" width="100">
</BOUNDS>
<PIN pinname="Cycles" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="254" dstpinname="Random Seed" srcnodeid="256" srcpinname="Cycles">
</LINK>
<NODE componentmode="InABox" id="258" nodename="IOBox (Value Advanced)" systemname="IOBox (Value Advanced)">
<BOUNDS height="100" left="12540" top="2550" type="Node" width="100">
</BOUNDS>
<BOUNDS height="720" left="12540" top="2550" type="Box" width="795">
</BOUNDS>
<PIN pinname="Rows" slicecount="1" values="3">
</PIN>
<PIN pinname="Y Input Value" slicecount="3" values="0,0,0">
</PIN>
<PIN pinname="Vector Size" slicecount="1" values="3">
</PIN>
<PIN encoded="0" pinname="Default" slicecount="1" values="|0, 0, 0|">
</PIN>
<PIN pinname="Y Output Value" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="252" dstpinname="Light Position XYZ" linkstyle="VHV" srcnodeid="258" srcpinname="Y Output Value">
<LINKPOINT x="12540" y="3345">
</LINKPOINT>
<LINKPOINT x="11340" y="3345">
</LINKPOINT>
</LINK>
<NODE componentmode="InABox" id="259" nodename="IOBox (String)" systemname="IOBox (String)">
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[3 - Lighting]&cr;&lf;Notice that one of the input pins of the <node>PhongPoint</node> is called <pin>Light Position XYZ</pin>. This pin accepts a 3D position for the light.&cr;&lf;<br />&cr;&lf;&cr;&lf;Create a <b>3D Vector</b> <node>IOBox</node> and connect it to this input pin. Now the light should be at the origin (<b>0,0,0</b>).&cr;&lf;<br />&cr;&lf;&cr;&lf;This kind of light source is a point light source (i.e. a light at a particular 3D position within the scene). If you want the objects to react to a directional light source, then use <node>PhongDirectional</node> or <node>GourandDirectional</node> instead of the point versions.|">
</PIN>
<BOUNDS height="270" left="8595" top="2745" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="330" left="8595" top="2745" type="Box" width="2085">
</BOUNDS>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="InABox" id="260" nodename="IOBox (String)" systemname="IOBox (String)">
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[4 - HLSL]&cr;&lf;Shaders are written in a language called <concept>HLSL</concept>. To see this code, <click/><rmb/> on the <node>PhongPoint</node>. This brings up the <concept>Code Editor</concept>.&cr;&lf;<br />&cr;&lf;&cr;&lf;As you get more advanced with VVVV, you can try editing these shaders yourself.&cr;&lf;<br />&cr;&lf;&cr;&lf;If you want to learn more about shaders, I suggest looking at http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html (I've got that book and that's how I learnt!).|">
</PIN>
<BOUNDS height="270" left="11865" top="9810" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="375" left="11865" top="9810" type="Box" width="1215">
</BOUNDS>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="InABox" id="261" nodename="IOBox (String)" systemname="IOBox (String)">
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[5 - GPU calculations]&cr;&lf;GPU's have become much more powerful than CPU's (50-100x more powerful), and can therefore perform much more calculations than a CPU can within the time of 1 frame (1/60th of a second). &cr;&lf;<br />&cr;&lf;&cr;&lf;Many developers are therefore exploiting GPU's to perform calculations. One example of this is the <b>GPU Particles</b> library in the contributions section of the website, which allows you to manipulate and render 1000's of particles at the same time by harnessing the power of the GPU.|">
</PIN>
<BOUNDS height="270" left="11325" top="10515" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="330" left="11325" top="10515" type="Box" width="2430">
</BOUNDS>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
</PATCH>