From 15b30fe20b401d079c2b3c6a8e77eee827813de3 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 17 Mar 2015 22:54:19 +0000 Subject: Gem 096ed6ef786b7a9d6e11a437ff8526619c89a1fd osx/x86_64 built 'master:096ed6ef786b7a9d6e11a437ff8526619c89a1fd' for osx/x86_64 --- Gem/examples/10.glsl/03.texture_distortion.pd | 144 ++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 Gem/examples/10.glsl/03.texture_distortion.pd (limited to 'Gem/examples/10.glsl/03.texture_distortion.pd') diff --git a/Gem/examples/10.glsl/03.texture_distortion.pd b/Gem/examples/10.glsl/03.texture_distortion.pd new file mode 100644 index 0000000..be30c96 --- /dev/null +++ b/Gem/examples/10.glsl/03.texture_distortion.pd @@ -0,0 +1,144 @@ +#N canvas 10 10 552 667 10; +#X text 381 660 ch 20007; +#X obj 74 -1 gemhead; +#X msg 29 80 print; +#X obj 74 382 glsl_program; +#X obj 147 281 pack 0 0; +#X msg 31 162 print; +#X obj 168 261 t b f; +#X obj 168 216 change; +#X obj 146 121 change; +#X msg 147 304 link \$1 \$2; +#X msg 98 353 print; +#X floatatom 168 242 2 0 0 0 ID - -; +#X floatatom 146 144 2 0 0 0 ID - -; +#X obj 165 325 print linking; +#X obj 74 196 glsl_fragment; +#X obj 74 102 glsl_vertex; +#X obj 74 571 pix_texture; +#X obj 124 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 74 24 alpha; +#X obj 124 522 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X floatatom 361 352 5 0 0 0 - - -; +#X floatatom 476 353 5 0 0 0 - - -; +#X msg 124 500 0; +#N canvas 0 0 450 300 load_shader 0; +#X obj 89 99 t b b; +#X msg 119 126 0; +#X obj 89 154 outlet; +#X obj 89 71 gemhead 1; +#X connect 0 0 2 0; +#X connect 0 1 1 0; +#X connect 1 0 3 0; +#X connect 3 0 0 0; +#X restore 124 38 pd load_shader; +#N canvas 0 0 450 300 init_shader 0; +#X obj 89 154 outlet; +#X obj 89 45 inlet; +#X obj 89 73 change; +#X obj 89 100 t b; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 0 0; +#X restore 155 405 pd init_shader; +#X obj 124 479 loadbang; +#X text 416 351 <- 2; +#X msg 92 431 open texture.jpg; +#X msg 361 373 K1 \$1; +#X msg 361 327 1; +#X msg 476 375 seed \$1; +#X msg 88 80 open T_distord.vert; +#X msg 85 166 open T_distord.frag; +#X obj 74 458 pix_image img3.jpg; +#X obj 74 596 rectangle 4 4; +#X text 73 627 This shader compute a dirty pseudo random number \, +and distort the texture this with value; +#N canvas 87 154 247 179 Gem.init 0; +#X obj 118 46 loadbang; +#X msg 118 81 reset; +#X obj 118 113 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 384 41 pd Gem.init; +#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 354 58 pd gemwin; +#X msg 124 542 rectangle \$1; +#X connect 1 0 18 0; +#X connect 2 0 15 0; +#X connect 3 0 33 0; +#X connect 3 1 24 0; +#X connect 4 0 9 0; +#X connect 5 0 14 0; +#X connect 6 0 4 0; +#X connect 6 1 4 1; +#X connect 7 0 11 0; +#X connect 8 0 12 0; +#X connect 9 0 3 0; +#X connect 9 0 13 0; +#X connect 10 0 3 0; +#X connect 11 0 6 0; +#X connect 12 0 4 0; +#X connect 14 0 3 0; +#X connect 14 1 7 0; +#X connect 15 0 14 0; +#X connect 15 1 8 0; +#X connect 16 0 34 0; +#X connect 17 0 31 0; +#X connect 17 0 32 0; +#X connect 18 0 15 0; +#X connect 19 0 38 0; +#X connect 20 0 28 0; +#X connect 21 0 30 0; +#X connect 22 0 19 0; +#X connect 23 0 17 0; +#X connect 24 0 29 0; +#X connect 25 0 22 0; +#X connect 27 0 33 0; +#X connect 28 0 3 0; +#X connect 29 0 20 0; +#X connect 30 0 3 0; +#X connect 31 0 15 0; +#X connect 32 0 14 0; +#X connect 33 0 16 0; +#X connect 36 0 37 0; +#X connect 38 0 16 0; -- cgit v1.2.1