#N canvas 263 22 1013 708 10; #X declare -path . -path .. -path data -path ../data -path ev-in -path ../ev-in -path ev-main -path ../ev-main -path ev-pano -path ../ev-pano -path ev-pro -path ../ev-pro -path libs/gil -path ../libs/gil -path libs/kollabs -path ../libs/kollabs -path media -path ../media -path ev-glsl -path ../ev-glsl -lib Gem; #X obj 372 159 cnv 15 250 500 empty empty patch 20 12 0 14 -262130 -66577 0; #X obj 6 -2 cnv 15 925 16 empty empty EXTENDED_VIEW_GLSL-MODULE 2 8 0 14 -99865 -262144 0; #X text 61 540 (c)2012 Marian Weger \; part of EXTENDEDVIEW toolkit/ gpl v3; #X obj 632 160 cnv 15 300 300 empty empty controls_for_shader 20 12 0 14 -204800 -66577 0; #X obj 439 316 loadbang; #X obj 417 317 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 389 380 pix_image; #X obj 650 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -258113 -1 -1 7000 1; #X obj 670 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -4034 -1 -1 6350 1; #X obj 690 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -4160 -1 -1 6350 1; #X msg 417 344 open ../media/cam2.jpg; #X obj 389 225 gemhead; #X obj 650 195 loadbang; #X msg 650 428 gain \$1 \$2 \$3 \$4; #X obj 389 268 alpha; #X obj 710 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -1 -262144 -1 6350 1; #X msg 650 217 1; #N canvas 0 22 450 300 pack4 0; #X obj 141 102 t b f; #X obj 181 102 t b f; #X obj 221 102 t b f; #X obj 101 162 pack 1 1 1 1; #X obj 101 42 inlet; #X obj 141 42 inlet; #X obj 181 42 inlet; #X obj 221 42 inlet; #X obj 101 204 outlet; #X connect 0 0 3 0; #X connect 0 1 3 1; #X connect 1 0 3 0; #X connect 1 1 3 2; #X connect 2 0 3 0; #X connect 2 1 3 3; #X connect 3 0 8 0; #X connect 4 0 3 0; #X connect 5 0 0 0; #X connect 6 0 1 0; #X connect 7 0 2 0; #X restore 650 406 pd pack4; #X obj 372 470 cnv 15 560 230 empty empty empty 20 12 0 14 -262130 -66577 0; #X text 432 266 needed only \, if the shader; #X text 432 279 works with alpha.; #X text 737 275 These controls are only for the; #X text 737 288 "gain" shader loaded in this; #X text 739 301 example.; #X text 739 331 Other shaders might need; #X text 739 344 different controls.; #X obj 6 24 cnv 15 360 250 empty empty description 5 12 0 12 -233017 -66577 0; #X text 9 41 This abstraction loads pairs of GLSL Fragment and Vertex-Shaders \, and applies them to the gemlist.; #X text 18 142 .frag contains the fragment shader.; #X text 18 158 .vert contains the vertex shader.; #X text 8 92 This abstraction needs specific ".frag" \, ".vert" and ".ctl.pd" files \, sitting in the "./glsl" folder \, where: ; #X obj 6 286 cnv 15 360 60 empty empty creation_arguments: 5 12 0 12 -162280 -1 0; #X text 9 308 1st: shader name; #X obj 6 359 cnv 15 360 70 empty empty inlets/outlets 5 12 0 12 -233017 -66577 0; #X text 11 379 Inlet 1: GEMlist; #X text 201 379 Outlet 1: GEMlist; #X text 11 394 Inlet 2: Shader controls; #X text 18 176 .ctl.pd is a small pd abstraction with the controls of the shader. A template can be found in here:; #X obj 373 32 cnv 15 300 120 empty empty Create_Gem_Window 20 12 0 14 -204786 -66577 0; #X obj 394 127 gemwin 20; #X msg 430 103 0 \, destroy; #X msg 394 77 dimen 800 600 \, color 0.5 0.5 0.5 \, create \, 1; #X text 437 59 CLICK HERE TO START:; #X obj 79 617 ../ev-main/ev_declare; #X text 81 596 load required pathes; #X obj 6 445 cnv 15 360 70 empty empty GUI_controls 5 12 0 12 -204800 -66577 0; #X text 11 475 on/off --- on (shader active) \, off (shader inactive) ; #X text 121 214 Template for ".ctl.pd"; #X obj 389 577 pix_texture; #X obj 389 679 rectangle 4 3; #X msg 464 610 \$3 \$2; #X obj 464 632 /; #X obj 464 654 * 4; #X text 514 616 scale rectangle automatically to the aspect ratio of the texture.; #X text 575 523 apply the shader that is specified by creation argument ; #X msg 406 553 rectangle 1; #X obj 406 531 loadbang; #X text 486 554 "rectangle texturing" needed for this shader; #X obj 411 436 bng 15 250 50 0 empty empty bang_to_reload_shaders 17 7 0 10 -262144 -1 -1; #X obj 151 236 glsl/name.ctl; #X text 69 236 Look inside:; #X obj 389 481 ev_glsl mygain dummy gain; #X connect 4 0 10 0; #X connect 5 0 10 0; #X connect 6 0 61 0; #X connect 7 0 17 0; #X connect 8 0 17 1; #X connect 9 0 17 2; #X connect 10 0 6 0; #X connect 11 0 14 0; #X connect 12 0 16 0; #X connect 13 0 61 2; #X connect 14 0 6 0; #X connect 15 0 17 3; #X connect 16 0 9 0; #X connect 16 0 8 0; #X connect 16 0 7 0; #X connect 16 0 15 0; #X connect 17 0 13 0; #X connect 40 0 39 0; #X connect 41 0 39 0; #X connect 48 0 49 0; #X connect 48 1 50 0; #X connect 50 0 51 0; #X connect 51 0 52 0; #X connect 52 0 49 2; #X connect 55 0 48 0; #X connect 56 0 55 0; #X connect 58 0 61 0; #X connect 61 0 48 0; #X coords 0 708 1 707 85 60 0;