#N canvas 54 22 842 789 10;
#X obj 225 24 gemhead 1;
#X obj 225 47 world_light;
#X obj 77 112 gemhead;
#X obj 77 171 glsl_vertex;
#X obj 148 131 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X text 170 129 open a vertex-program;
#N canvas 0 22 450 300 open 0;
#X obj 75 103 openpanel;
#X obj 75 173 outlet;
#X obj 75 127 t b s;
#X msg 105 152 set open \$1;
#X obj 75 80 inlet;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 2 1 3 0;
#X connect 3 0 1 0;
#X connect 4 0 0 0;
#X restore 91 130 pd open;
#X msg 35 142 print;
#X obj 77 733 rotateXYZ;
#X obj 126 714 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
-262144 -1 -1 0 256;
#X obj 126 697 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
-262144 -1 -1 0 256;
#X obj 126 680 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
-262144 -1 -1 0 256;
#X obj 206 25 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 77 576 glsl_program;
#X obj 150 393 pack 0 0;
#X obj 143 246 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#N canvas 0 22 450 300 open 0;
#X obj 75 103 openpanel;
#X obj 75 173 outlet;
#X obj 75 127 t b s;
#X msg 105 152 set open \$1;
#X obj 75 80 inlet;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 2 1 3 0;
#X connect 3 0 1 0;
#X connect 4 0 0 0;
#X restore 86 245 pd open;
#X text 164 244 open a fragment-program;
#X msg 34 266 print;
#X obj 171 373 t b f;
#X msg 335 92 bang;
#X obj 77 753 teapot;
#X obj 171 328 change;
#X obj 149 190 change;
#X msg 150 433 link \$1 \$2;
#X msg 33 486 print;
#X msg 266 546 Phong \$1;
#X obj 269 508 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 266 528 5 0 0 0 - - -;
#X obj 77 612 t a b;
#X obj 107 632 spigot;
#X obj 144 614 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 107 652 i;
#X obj 135 652 + 1;
#X obj 163 652 % 360;
#X text 435 96 click here to load both the vertex- and the fragment-shader
;
#X text 165 172 the vertex shader;
#X obj 77 308 glsl_fragment;
#X text 191 311 the fragment shader;
#X text 222 395 whenever either the fragment-shader ID or the vertex-shader
ID has changed \, we trigger the linking of the 2 modules;
#X floatatom 171 354 2 0 0 0 ID - -;
#X floatatom 149 213 2 0 0 0 ID - -;
#X obj 168 454 print linking;
#X text 264 441 order of module IDs does not matter...;
#X text 96 487 after linking \, click "print" to get some info about
the compiled shader program;
#X text 330 550 the Toon-shader has a unifom variable "Phong" (see
"print") \, which we can change to modify the effect.;
#X text 213 264 pd's search path is searched for the given filename
\; just add the examples/data folder to your path options and this
example should work;
#X obj 335 133 t s s;
#X msg 91 150 open \$1.vert;
#X msg 86 265 open \$1.frag;
#X symbolatom 381 93 0 0 0 0 - - -;
#X obj 335 114 symbol ../data/Toon;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
-1 -1 1 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
#X msg 177 215 destroy;
#X obj 102 239 t a;
#X obj 318 54 inlet;
#X obj 318 255 gemwin;
#X obj 318 100 t a a;
#X obj 318 287 outlet;
#X obj 350 128 route create destroy;
#X obj 350 150 t b;
#X msg 350 172 1;
#X obj 390 150 t b;
#X msg 390 172 0;
#X obj 350 195 t f;
#X msg 350 219 set \$1;
#X text 118 122 rendering;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 7 0 9 0;
#X connect 8 0 7 0;
#X connect 8 1 10 0;
#X connect 10 0 11 0;
#X connect 10 1 13 0;
#X connect 11 0 12 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 39 51 pd gemwin;
#X msg 39 29 lighting \$1;
#X obj 39 10 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 3 0 37 0;
#X connect 3 1 23 0;
#X connect 4 0 6 0;
#X connect 6 0 48 0;
#X connect 7 0 3 0;
#X connect 8 0 21 0;
#X connect 9 0 8 3;
#X connect 10 0 8 2;
#X connect 11 0 8 1;
#X connect 12 0 0 0;
#X connect 13 0 29 0;
#X connect 14 0 24 0;
#X connect 15 0 16 0;
#X connect 16 0 49 0;
#X connect 18 0 37 0;
#X connect 19 0 14 0;
#X connect 19 1 14 1;
#X connect 20 0 51 0;
#X connect 22 0 40 0;
#X connect 23 0 41 0;
#X connect 24 0 13 0;
#X connect 24 0 42 0;
#X connect 25 0 13 0;
#X connect 26 0 13 0;
#X connect 27 0 28 0;
#X connect 28 0 26 0;
#X connect 29 0 8 0;
#X connect 29 1 30 0;
#X connect 30 0 32 0;
#X connect 31 0 30 1;
#X connect 32 0 33 0;
#X connect 32 0 11 0;
#X connect 32 0 10 0;
#X connect 32 0 9 0;
#X connect 33 0 34 0;
#X connect 34 0 32 1;
#X connect 37 0 13 0;
#X connect 37 1 22 0;
#X connect 40 0 19 0;
#X connect 41 0 14 0;
#X connect 47 0 48 0;
#X connect 47 1 49 0;
#X connect 48 0 3 0;
#X connect 49 0 37 0;
#X connect 50 0 51 0;
#X connect 51 0 47 0;
#X connect 53 0 52 0;
#X connect 54 0 53 0;
