[PD] GEM: multitexturing in GEM

vade doktorp at mac.com
Fri Jul 6 00:55:04 CEST 2007


sorry. let me clarify. long work day does not make me clear.

switching texunit switches the textures. however, mixing only occurs  
between unit 0 and unit 0. Not between unit 0 and 1.

this is with Cyrille's patch.

Thanks.

On Jul 5, 2007, at 6:42 PM, vade wrote:

> The reason mode 1 works and mode 2 doesnt is because mode 1 uses  
> rectangular textures, since video is typically not power of 2  
> sized, my samplers are created for rect textures.
>
> However, using the patch cyrille:
>
> loading the shader works
> manipulating the amount uniform variable produces a visible result.  
> however, it is not as intended.
>
> switching texunit 0 to 1 does switch the textures, but does seem to  
> apply a secondary texture. whichever is 0 shows. and seems to mix  
> only between the zeroth texture unit. not 0 and 1.
>
> Thanks.
>
> On Jul 5, 2007, at 6:04 PM, cyrille henry wrote:
>
>>
>>
>> chris clepper a écrit :
>>> Did you try my suggestion to send a 'texunit $1' message to
>>> pix_texture?  It sets the texture unit for the shader to read from.
>> do you mean having 2 pix_texture one after the other in order to  
>> load 2 diferent pix?
>>
>>
>> i tried this patch (to be used with vade shader), with no succes.
>>
>> cyrille
>>
>>
>>> On 7/5/07, vade <doktorp at mac.com> wrote:
>>>> Well, ive released the beta for Jitter. You guys are free to  
>>>> port whatever
>>>> you want, but Ive heard nothing on the multitexturing side of  
>>>> things for PD.
>>>> Im a bit saddened by that, but, whatever.
>>>>
>>>> http://001.vade.info has the jxs files, help files, shaders and  
>>>> example
>>>> content.
>>>>
>>>> Hopefully this can get sorted out soon enough.
>>>>
>>>>
>>>> v a d e //
>>>>
>>>> www.vade.info
>>>> abstrakt.vade.info
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> PD-list at iem.at mailing list
>>>> UNSUBSCRIBE and account-management ->
>>>> http://lists.puredata.info/listinfo/pd-list
>>>>
>>>>
>>> _______________________________________________
>>> PD-list at iem.at mailing list
>>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
>>> listinfo/pd-list
>> #N canvas 47 25 932 764 10;
>> #X obj 30 29 cnv 15 100 60 empty empty empty 20 12 0 14 -195568  
>> -66577
>> 0;
>> #N canvas 0 22 462 312 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 obj 306 45 inlet;
>> #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 connect 8 0 0 0;
>> #X restore 35 68 pd gemwin;
>> #X msg 35 49 destroy;
>> #X text 31 28 Create window:;
>> #X floatatom 285 205 5 0 0 0 - - -;
>> #X obj 398 148 openpanel;
>> #X msg 397 169 open \$1;
>> #X obj 398 129 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
>> -1;
>> #X obj 195 109 gemhead 1;
>> #X obj 195 256 rectangle 1 1;
>> #X obj 396 267 rectangle 1 1;
>> #X obj 674 118 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
>> 1;
>> #X msg 55 442 mode \$1;
>> #X obj 56 421 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
>> ;
>> #X obj 674 137 gemhead 50;
>> #X obj 415 107 gemhead 20;
>> #X obj 104 48 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
>> ;
>> #X obj 55 462 s mode;
>> #X obj 612 587 r mode;
>> #X text 37 402 mode 0 doesn't!;
>> #X obj 147 208 r mode;
>> #X obj 339 219 r mode;
>> #X text 164 7 these are just conveniences to open similar sized  
>> movies
>> ;
>> #X text 37 388 mode 1 works (default);
>> #X obj 396 192 pix_image;
>> #X obj 195 190 pix_image;
>> #X obj 210 147 openpanel;
>> #X msg 209 168 open \$1;
>> #X obj 210 128 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
>> -1;
>> #X msg 629 220 print;
>> #X obj 747 451 pack 0 0;
>> #X msg 631 332 print;
>> #X obj 768 431 t b f;
>> #X obj 764 386 change;
>> #X obj 746 261 change;
>> #X msg 747 477 link \$1 \$2;
>> #X msg 634 497 print;
>> #X floatatom 768 412 2 0 0 0 ID - -;
>> #X floatatom 746 284 2 0 0 0 ID - -;
>> #X obj 765 498 print linking;
>> #X obj 674 242 glsl_vertex;
>> #X obj 674 366 glsl_fragment;
>> #X obj 787 180 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
>> -1 -1;
>> #X floatatom 498 209 5 0 0 0 - - -;
>> #X msg 434 82 open img1.jpg;
>> #X msg 225 77 open img2.jpg;
>> #X obj 676 698 square 1;
>> #X obj 676 673 translateXYZ 0 -1.5 0;
>> #X floatatom 755 560 5 0 0 0 - - -;
>> #X obj 676 536 glsl_program;
>> #X msg 267 343 texUnit 1 \$1;
>> #X msg 468 343 texUnit 0 \$1;
>> #X obj 195 234 translateXYZ -3 0 0;
>> #X obj 396 241 translateXYZ 3 0 0;
>> #X obj 676 588 pix_texture;
>> #X msg 496 428 texunit 0;
>> #X msg 504 450 texunit 1;
>> #X msg 513 474 texunit 2;
>> #X obj 396 218 pix_texture;
>> #X obj 196 210 pix_texture;
>> #X obj 677 626 pix_texture;
>> #X msg 491 533 texunit 0;
>> #X msg 499 555 texunit 1;
>> #X msg 508 579 texunit 2;
>> #X msg 688 220 open vade.vert;
>> #X msg 684 336 open vade.frag;
>> #X obj 390 424 loadbang;
>> #X floatatom 838 309 5 0 0 0 - - -;
>> #X msg 832 344 amount \$1;
>> #X connect 1 0 2 0;
>> #X connect 2 0 1 0;
>> #X connect 5 0 6 0;
>> #X connect 6 0 24 0;
>> #X connect 7 0 5 0;
>> #X connect 8 0 25 0;
>> #X connect 11 0 14 0;
>> #X connect 12 0 17 0;
>> #X connect 13 0 12 0;
>> #X connect 14 0 40 0;
>> #X connect 15 0 24 0;
>> #X connect 16 0 1 1;
>> #X connect 18 0 54 0;
>> #X connect 20 0 59 0;
>> #X connect 21 0 58 0;
>> #X connect 24 0 58 0;
>> #X connect 25 0 59 0;
>> #X connect 26 0 27 0;
>> #X connect 27 0 25 0;
>> #X connect 28 0 26 0;
>> #X connect 29 0 40 0;
>> #X connect 30 0 35 0;
>> #X connect 31 0 41 0;
>> #X connect 32 0 30 0;
>> #X connect 32 1 30 1;
>> #X connect 33 0 37 0;
>> #X connect 34 0 38 0;
>> #X connect 35 0 39 0;
>> #X connect 35 0 49 0;
>> #X connect 36 0 49 0;
>> #X connect 37 0 32 0;
>> #X connect 38 0 30 0;
>> #X connect 40 0 41 0;
>> #X connect 40 1 34 0;
>> #X connect 41 0 49 0;
>> #X connect 41 1 33 0;
>> #X connect 42 0 64 0;
>> #X connect 42 0 65 0;
>> #X connect 44 0 24 0;
>> #X connect 45 0 25 0;
>> #X connect 47 0 46 0;
>> #X connect 49 0 54 0;
>> #X connect 49 1 48 0;
>> #X connect 52 0 9 0;
>> #X connect 53 0 10 0;
>> #X connect 54 0 60 0;
>> #X connect 55 0 54 0;
>> #X connect 56 0 54 0;
>> #X connect 57 0 54 0;
>> #X connect 58 0 53 0;
>> #X connect 58 1 51 0;
>> #X connect 58 1 43 0;
>> #X connect 58 1 54 1;
>> #X connect 59 0 52 0;
>> #X connect 59 1 4 0;
>> #X connect 59 1 50 0;
>> #X connect 59 1 60 1;
>> #X connect 60 0 47 0;
>> #X connect 61 0 60 0;
>> #X connect 62 0 60 0;
>> #X connect 63 0 60 0;
>> #X connect 64 0 40 0;
>> #X connect 65 0 41 0;
>> #X connect 66 0 55 0;
>> #X connect 66 0 62 0;
>> #X connect 67 0 68 0;
>> #X connect 68 0 49 0;
>> _______________________________________________
>> PD-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
>> listinfo/pd-list
>
> v a d e //
>
> www.vade.info
> abstrakt.vade.info
>
>
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
> listinfo/pd-list

v a d e //

www.vade.info
abstrakt.vade.info



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070705/6ca42c15/attachment.htm>


More information about the Pd-list mailing list