#N canvas 597 88 896 842 10;
#X obj 27 60 gemwin;
#X msg 37 38 0 \, destroy;
#X msg 26 18 create \, 1 \, lighting 1;
#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 msg 27 82 create;
#X obj 6 60 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 375 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 326 546 Phong \$1;
#X obj 329 508 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
#X floatatom 326 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 475 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 390 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 375 133 t s s;
#X msg 91 150 open \$1.vert;
#X msg 86 265 open \$1.frag;
#X symbolatom 421 93 0 0 0 0 - - -;
#X obj 375 114 symbol ../data/Toon;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 4 0;
#X connect 5 0 6 0;
#X connect 6 0 42 0;
#X connect 6 1 28 0;
#X connect 7 0 9 0;
#X connect 9 0 53 0;
#X connect 10 0 6 0;
#X connect 11 0 26 0;
#X connect 12 0 11 3;
#X connect 13 0 11 2;
#X connect 14 0 11 1;
#X connect 15 0 3 0;
#X connect 16 0 0 0;
#X connect 17 0 0 0;
#X connect 18 0 34 0;
#X connect 19 0 29 0;
#X connect 20 0 21 0;
#X connect 21 0 54 0;
#X connect 23 0 42 0;
#X connect 24 0 19 0;
#X connect 24 1 19 1;
#X connect 25 0 56 0;
#X connect 27 0 45 0;
#X connect 28 0 46 0;
#X connect 29 0 18 0;
#X connect 29 0 47 0;
#X connect 30 0 18 0;
#X connect 31 0 18 0;
#X connect 32 0 33 0;
#X connect 33 0 31 0;
#X connect 34 0 11 0;
#X connect 34 1 35 0;
#X connect 35 0 37 0;
#X connect 36 0 35 1;
#X connect 37 0 38 0;
#X connect 37 0 14 0;
#X connect 37 0 13 0;
#X connect 37 0 12 0;
#X connect 38 0 39 0;
#X connect 39 0 37 1;
#X connect 42 0 18 0;
#X connect 42 1 27 0;
#X connect 45 0 24 0;
#X connect 46 0 19 0;
#X connect 52 0 53 0;
#X connect 52 1 54 0;
#X connect 53 0 6 0;
#X connect 54 0 42 0;
#X connect 55 0 56 0;
#X connect 56 0 52 0;
