#N canvas 953 0 648 785 10;
#X declare -lib Gem;
#X obj 163 518 gemhead;
#X obj 218 539 openpanel;
#X msg 218 560 open \$1;
#X obj 218 518 bng 15 250 50 0 empty empty empty 17 7 0 10 #f8fc00 #000000 #000000;
#X obj 343 518 gemhead;
#X obj 398 539 openpanel;
#X msg 398 560 open \$1;
#X obj 398 518 bng 15 250 50 0 empty empty empty 17 7 0 10 #f8fc00 #000000 #000000;
#X obj 383 79 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 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 388 118 pd gemwin;
#X msg 388 99 create;
#X text 384 78 Create window:;
#X obj 107 147 cnv 15 120 120 empty empty empty 20 12 0 14 #00fc04 #404040 0;
#X obj 37 381 gemhead 51;
#X msg 119 160 add;
#X msg 119 220 multiply;
#X msg 119 240 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 82 275 pd route;
#X msg 82 296 style \$1;
#X obj 119 126 loadbang;
#X obj 37 508 pix_set;
#X obj 163 246 hsl 50 10 0 1 0 1 empty empty MIX_FACTOR -2 -4 0 7 #fcfcfc #000000 #000000 3400 1;
#X msg 119 200 diff;
#X text 487 99 <- 1 : create GEM window;
#X text 276 209 add : add two texture together (it is easy to get a white out);
#X msg 119 180 subtract;
#X text 29 24 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 276 235 subtract : subtract two texture together (it is easy to get a black out);
#X text 276 261 diff : subtract two texture together (get absolute value);
#X text 276 275 multiply : multiply two texture together;
#X text 276 289 mix : mix two texture together (use the mix factor for crossfading);
#X text 234 191 <- 2 : test different mix;
#X obj 343 609 pix_resize 512 512;
#X obj 163 609 pix_resize 234 543;
#X obj 163 589 pix_image ../data/img3.jpg;
#X obj 343 589 pix_image ../data/img2.jpg;
#X text 176 628 images have different sizes;
#X msg 160 296 mix_factor \$1;
#X obj 37 586 square 4;
#X obj 533 6 declare -lib Gem;
#X obj 37 535 pix_texture \; rectangle 1 \; texunit 0;
#X obj 163 693 pix_texture \; rectangle 1 \; texunit 1;
#X obj 343 693 pix_texture \; rectangle 1 \; texunit 2;
#X msg 60 417 bang;
#X obj 37 452 glsl shader/GLSL_mix \; Ttex1 1 \; Ttex2 2;
#X connect 0 0 34 0;
#X connect 1 0 2 0;
#X connect 2 0 34 0;
#X connect 3 0 1 0;
#X connect 4 0 35 0;
#X connect 5 0 6 0;
#X connect 6 0 35 0;
#X connect 7 0 5 0;
#X connect 9 0 10 0;
#X connect 10 0 9 0;
#X connect 13 0 44 0;
#X connect 14 0 17 0;
#X connect 15 0 17 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 18 0 44 1;
#X connect 19 0 14 0;
#X connect 20 0 40 0;
#X connect 21 0 37 0;
#X connect 22 0 17 0;
#X connect 25 0 17 0;
#X connect 32 0 42 0;
#X connect 33 0 41 0;
#X connect 34 0 33 0;
#X connect 35 0 32 0;
#X connect 37 0 44 1;
#X connect 40 0 38 0;
#X connect 43 0 44 0;
#X connect 44 0 20 0;
