Is it what you are looking for ? ++ Jack
Le samedi 28 novembre 2009 à 17:53 +0100, Matteo Sisti Sette a écrit : > Hi, > > Now, I don't know if this is possible at all. > > Suppose I have a [rectangle] (or whatever primitive indeed) with a > texture, and something behind the rectangle. > Is it possible to have the rectangle "blend" with the background with > some blending mode (such as add, multiply, etc)? > (without having to render all the rest of the scene except the rectangle > into a texture via gemframebuffer, and then blending the two textures > with pix_add and friends)??? > > Isn't it a matter of shaders? I guess it could be achieved using openGL > functions... but is there a "simple" way? > > Thanks > m. > >
#N canvas 95 153 670 609 10; #X obj 157 138 translateXYZ 0 0 -4; #X obj 157 114 gemframebuffer; #X msg 182 81 dimen 500 500; #X obj 182 58 loadbang; #X obj 157 168 pix_image; #X obj 157 188 pix_texture; #X obj 157 208 rectangle 2 1.5; #X obj 157 228 t a b; #X obj 157 248 pix_snap 0 0 500 500; #X obj 157 268 pix_share_write 345 500 500 rgba; #X msg 296 151 open \$1; #X obj 296 128 openpanel; #X obj 296 107 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 157 27 gemhead 50; #X obj 397 114 gemframebuffer; #X msg 422 81 dimen 500 500; #X obj 422 58 loadbang; #X obj 397 168 pix_image; #X obj 397 188 pix_texture; #X obj 397 228 t a b; #X obj 397 248 pix_snap 0 0 500 500; #X msg 536 151 open \$1; #X obj 536 128 openpanel; #X obj 536 107 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 397 27 gemhead 50; #X obj 397 268 pix_share_write 346 500 500 rgba; #X msg 25 34 create \, 1; #X msg 45 61 destroy; #X obj 25 90 gemwin; #X obj 397 327 gemhead 51; #X obj 157 327 gemhead 51; #X obj 397 208 rectangle 4 3; #X obj 397 138 translateXYZ 0 0 -5; #X obj 157 348 pix_share_read 345 500 500 rgba; #X obj 397 348 pix_share_read 346 500 500 rgba; #X obj 157 378 pix_add; #X obj 157 398 pix_texture; #X obj 157 418 rectangle 4 3; #X floatatom 296 72 5 0 0 0 - - -; #X text 331 70 <- 3; #X text 321 105 <- 1; #X text 561 105 <- 2; #X text 430 432 Jack/RYBN 2009; #X connect 0 0 4 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 7 1 8 0; #X connect 8 0 9 0; #X connect 10 0 4 0; #X connect 11 0 10 0; #X connect 12 0 11 0; #X connect 13 0 1 0; #X connect 14 0 32 0; #X connect 15 0 14 0; #X connect 16 0 15 0; #X connect 17 0 18 0; #X connect 18 0 31 0; #X connect 19 0 20 0; #X connect 19 1 20 0; #X connect 20 0 25 0; #X connect 21 0 17 0; #X connect 22 0 21 0; #X connect 23 0 22 0; #X connect 24 0 14 0; #X connect 26 0 28 0; #X connect 27 0 28 0; #X connect 29 0 34 0; #X connect 30 0 33 0; #X connect 31 0 19 0; #X connect 32 0 17 0; #X connect 33 0 35 0; #X connect 34 0 35 1; #X connect 35 0 36 0; #X connect 36 0 37 0; #X connect 38 0 0 1;
_______________________________________________ GEM-dev mailing list [email protected] http://lists.puredata.info/listinfo/gem-dev
