#N canvas 511 97 648 675 10;
#X obj 279 76 gemhead;
#X obj 295 208 loadbang;
#X obj 279 251 pix_texture;
#X msg 295 231 rectangle 1 \, texunit 1;
#X obj 334 97 openpanel;
#X msg 334 118 open \$1;
#X obj 334 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -257985 -1
-1;
#X obj 459 76 gemhead;
#X obj 475 208 loadbang;
#X obj 459 251 pix_texture;
#X obj 514 97 openpanel;
#X msg 514 118 open \$1;
#X obj 514 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -257985 -1
-1;
#X msg 475 231 rectangle 1 \, texunit 2;
#X obj 279 275 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577
0;
#N canvas 0 0 450 300 gemwin 0;
#X obj 132 136 gemwin;
#X obj 67 89 outlet;
#X obj 67 10 inlet;
#X obj 67 41 route create;
#X msg 67 70 set destroy;
#X msg 142 68 set create;
#X msg 132 112 create \, 1;
#X msg 198 112 destroy;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 3 0 6 0;
#X connect 3 1 5 0;
#X connect 3 1 7 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X restore 284 314 pd gemwin;
#X msg 284 295 create;
#X text 280 274 Create window:;
#X obj 101 358 cnv 15 100 120 empty empty empty 20 12 0 14 -4034 -66577
0;
#X obj 37 538 glsl_program;
#X obj 100 259 pack 0 0;
#X obj 118 236 t b f;
#X obj 118 194 change;
#X msg 100 285 link \$1 \$2;
#X floatatom 118 217 2 0 0 0 ID - -;
#X floatatom 100 133 2 0 0 0 ID - -;
#X obj 105 309 print linking;
#X obj 124 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 37 88 glsl_vertex;
#X obj 37 174 glsl_fragment;
#N canvas 0 0 450 300 load_shader 0;
#X msg 116 126 0;
#X obj 89 154 outlet;
#X obj 89 71 gemhead 1;
#X obj 89 100 t b b;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X connect 3 1 0 0;
#X restore 124 21 pd load_shader;
#X obj 100 110 change;
#X obj 106 581 loadbang;
#X obj 37 21 gemhead 51;
#X msg 109 371 add;
#X msg 109 431 multiply;
#X msg 109 451 mix;
#N canvas 0 0 450 300 route 0;
#X obj 113 53 inlet;
#X msg 113 95 0;
#X msg 155 95 1;
#X msg 198 95 2;
#X msg 240 95 3;
#X obj 113 126 outlet;
#X msg 283 95 4;
#X obj 113 74 route add subtract diff multiply mix;
#X connect 0 0 7 0;
#X connect 1 0 5 0;
#X connect 2 0 5 0;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 6 0 5 0;
#X connect 7 0 1 0;
#X connect 7 1 2 0;
#X connect 7 2 3 0;
#X connect 7 3 4 0;
#X connect 7 4 6 0;
#X restore 72 486 pd route;
#X msg 184 540 Ttex1 1;
#X msg 240 540 Ttex2 2;
#X msg 72 507 style \$1;
#X obj 109 337 loadbang;
#X obj 37 625 pix_texture;
#X msg 106 603 rectangle 1 \, texunit 0;
#X obj 37 598 pix_set;
#X obj 142 457 hsl 50 10 0 1 0 0 empty empty MIX_FACTOR -2 -4 0 7 -262144
-1 -1 0 1;
#X msg 51 66 open GLSL_mix.vert;
#X msg 51 151 open GLSL_mix.frag;
#X msg 109 411 diff;
#X text 383 295 <- 1 : create GEM window;
#X text 248 375 add : add two texture together (it is easy to get a
white out);
#X msg 109 391 subtract;
#X text 277 16 This shader program give you the possibility to mix
two sources of different size. You can add \, subtract \, diff \, multiply
and mix the two sources.;
#X text 248 401 subtract : subtract two texture together (it is easy
to get a black out);
#X text 248 427 diff : subtract two texture together (get absolute
value);
#X text 248 441 multiply : multiply two texture together;
#X text 248 455 mix : mix two texture together (use the mix factor
for crossfading);
#N canvas 242 260 450 300 onebang 0;
#X obj 120 71 inlet;
#X obj 120 151 outlet;
#X obj 120 120 t b;
#X obj 120 100 change;
#X msg 161 71 set -1;
#X obj 161 11 gemhead;
#X obj 161 51 route 0;
#X obj 161 31 route gem_state;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 3 0;
#X connect 5 0 7 0;
#X connect 6 0 4 0;
#X connect 7 0 6 0;
#X restore 106 559 pd onebang;
#X text 206 357 <- 2 : test differents mix;
#X obj 459 167 pix_resize 512 512;
#X obj 279 167 pix_resize 234 543;
#X obj 279 147 pix_image img3.jpg;
#X obj 459 147 pix_image img2.jpg;
#X text 292 186 images have diferents sizes;
#X msg 139 507 mix_factor \$1;
#X obj 37 646 square 4;
#X connect 0 0 61 0;
#X connect 1 0 3 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 5 0 61 0;
#X connect 6 0 4 0;
#X connect 7 0 62 0;
#X connect 8 0 13 0;
#X connect 10 0 11 0;
#X connect 11 0 62 0;
#X connect 12 0 10 0;
#X connect 13 0 9 0;
#X connect 15 0 16 0;
#X connect 16 0 15 0;
#X connect 19 0 44 0;
#X connect 19 1 57 0;
#X connect 20 0 23 0;
#X connect 21 0 20 0;
#X connect 21 1 20 1;
#X connect 22 0 24 0;
#X connect 23 0 19 0;
#X connect 23 0 26 0;
#X connect 24 0 21 0;
#X connect 25 0 20 0;
#X connect 27 0 46 0;
#X connect 27 0 47 0;
#X connect 28 0 29 0;
#X connect 28 1 31 0;
#X connect 29 0 19 0;
#X connect 29 1 22 0;
#X connect 30 0 27 0;
#X connect 31 0 25 0;
#X connect 32 0 43 0;
#X connect 33 0 28 0;
#X connect 34 0 37 0;
#X connect 35 0 37 0;
#X connect 36 0 37 0;
#X connect 37 0 40 0;
#X connect 38 0 19 0;
#X connect 39 0 19 0;
#X connect 40 0 19 0;
#X connect 41 0 34 0;
#X connect 42 0 65 0;
#X connect 43 0 42 0;
#X connect 44 0 42 0;
#X connect 45 0 64 0;
#X connect 46 0 28 0;
#X connect 47 0 29 0;
#X connect 48 0 37 0;
#X connect 51 0 37 0;
#X connect 57 0 38 0;
#X connect 57 0 39 0;
#X connect 59 0 9 0;
#X connect 60 0 2 0;
#X connect 61 0 60 0;
#X connect 62 0 59 0;
#X connect 64 0 19 0;
