Forums > Jitter

2 "slab" inputs on jit.gl.slab

July 17, 2006 | 12:36 pm

Hello ,

It may sounds basic..I’m trying to compose 2 textures with a slab obj..and each of those textures are coming from 2 distinct slab obj..As a result the slab obj used to compose the textures seems to ignore the first input..Not sure I’m clear ..but here is an example..(I guess I’m missing a point to chain slab obj ..but I couldn’t find the info in the doc..)

Any help is welcome .

Thanks .

Pascal .

max v2;
#N vpatcher 400 147 1505 926;
#P origin 0 -17;
#P window setfont "Sans Serif" 9.;
#P user ubumenu 456 307 60 196617 0 1 1 0;
#X add pass;
#X add mult;
#X add div;
#X add add;
#X add sub;
#X add mod;
#X add min;
#X add max;
#X add abs;
#X add avg;
#X add absdiff;
#X add and;
#X add or;
#X add xor;
#X add not;
#X add gt;
#X add lt;
#X add gte;
#X add lte;
#X add eq;
#X add neq;
#X add gtp;
#X add ltp;
#X add gtep;
#X add ltep;
#X add eqp;
#X add neqp;
#X add sin;
#X add cos;
#X add tan;
#X add asin;
#X add acos;
#X add atan;
#X add atan2;
#X add sinh;
#X add cosh;
#X add tanh;
#X add asinh;
#X add acosh;
#X add atanh;
#X add exp;
#X add exp2;
#X add ln;
#X add log2;
#X add log10;
#X add hypot;
#X add pow;
#X add sqrt;
#X add ceil;
#X add floor;
#X add fract;
#X add normsin;
#X add normcos;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P window linecount 1;
#P newex 481 333 111 196617 sprintf read op.%s.jxs;
#P newex 268 395 70 196617 jit.gl.slab foo;
#B color 5;
#P flonum 901 174 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 859 174 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 796 202 111 196617 pak param center 0. 0.;
#P flonum 718 177 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 718 203 73 196617 param amp $1;
#P flonum 636 177 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 636 203 75 196617 param freq $1;
#P message 533 204 95 196617 read td.sinefold.jxs;
#P newex 500 240 70 196617 jit.gl.slab foo;
#B color 5;
#P flonum 257 180 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 257 203 79 196617 param scale $1;
#P flonum 339 180 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 339 203 73 196617 param bias $1;
#P message 145 204 104 196617 read cc.scalebias.jxs;
#P newex 130 245 70 196617 jit.gl.slab foo;
#B color 5;
#P flonum 696 312 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 696 333 92 196617 param in2scale $1;
#P flonum 600 313 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 600 334 85 196617 param inscale $1;
#P message 563 77 28 196617 read;
#P message 628 77 27 196617 stop;
#P message 594 77 31 196617 start;
#P toggle 500 58 15 0;
#P newex 500 77 55 196617 metro 20;
#P newex 500 109 104 196617 jit.qt.movie 320 240;
#P newex 353 427 79 196617 jit.gl.handle foo;
#P newex 268 462 185 196617 jit.gl.videoplane foo @scale 1.333 1. 1.;
#P message 193 78 28 196617 read;
#P message 258 78 27 196617 stop;
#P message 224 78 31 196617 start;
#P toggle 130 59 15 0;
#P newex 130 78 55 196617 metro 20;
#P newex 130 110 104 196617 jit.qt.movie 320 240;
#P toggle 198 568 15 0;
#P message 198 586 45 196617 sync $1;
#P toggle 125 568 15 0;
#P newex 86 567 35 196617 sel 27;
#P message 125 586 68 196617 fullscreen $1;
#P newex 43 610 145 196617 jit.window foo @depthbuffer 1;
#P newex 41 567 40 196617 key;
#P user jit.fpsgui 42 203 60 196617 0;
#P number 65 76 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 20 76 15 0;
#P newex 20 102 55 196617 qmetro 20;
#P newex 20 152 55 196617 t b b erase;
#P newex 20 489 80 196617 jit.gl.render foo;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P fasten 1 2 0 0 69 185 25 185;
#P connect 1 0 0 0;
#P connect 1 1 5 0;
#P fasten 11 0 7 0 203 605 48 605;
#P fasten 8 0 7 0 130 605 48 605;
#P connect 4 0 2 1;
#P fasten 6 0 9 0 46 586 83 586 83 565 91 565;
#P fasten 9 0 10 0 91 585 122 585 122 565 130 565;
#P connect 10 0 8 0;
#P connect 15 0 14 0;
#P fasten 14 0 13 0 135 104 135 104;
#P fasten 18 0 13 0 198 104 135 104;
#P fasten 17 0 13 0 263 104 135 104;
#P fasten 16 0 13 0 229 104 135 104;
#P connect 13 0 31 0;
#P fasten 35 0 31 0 262 226 135 226;
#P fasten 32 0 31 0 150 226 135 226;
#P fasten 33 0 31 0 344 226 135 226;
#P connect 12 0 11 0;
#P connect 36 0 35 0;
#P connect 31 0 46 0;
#P connect 29 0 46 0;
#P connect 27 0 46 0;
#P connect 47 0 46 0;
#P connect 46 0 19 0;
#P connect 20 0 19 0;
#P connect 37 0 46 1;
#P connect 34 0 33 0;
#P connect 48 1 47 0;
#P connect 23 0 22 0;
#P fasten 24 0 21 0 599 103 505 103;
#P fasten 25 0 21 0 633 103 505 103;
#P fasten 26 0 21 0 568 103 505 103;
#P fasten 22 0 21 0 505 103 505 103;
#P connect 21 0 37 0;
#P fasten 43 0 37 0 801 226 505 226;
#P fasten 41 0 37 0 723 225 505 225;
#P fasten 39 0 37 0 641 227 505 227;
#P fasten 38 0 37 0 538 226 505 226;
#P connect 28 0 27 0;
#P connect 40 0 39 0;
#P connect 30 0 29 0;
#P connect 42 0 41 0;
#P connect 44 0 43 2;
#P connect 45 0 43 3;
#P pop;


July 17, 2006 | 3:24 pm

Seems to work fine here. You may be using an operator that takes only
one input. Try using "absdiff" or something that requires both inputs.
It might be more straightforward to use one of the composite shaders to
accomplish this.

Cheers,
Andrew B.


July 18, 2006 | 7:29 am

Andrew ,

Well I’ve tried with op. like add, sub, absdiff etc. which I guess have 2 inputs ( the idea is that I want to have a dry/wet on the fx chain..performed by the op. shader..)..and still the same problem (it seems to work with only 1 input..)..Could it be related to grpahic cards or Jitter versions since I’ve tried on :
-A Intel Mini with Jitter 1.6..it doesn’t work .
-a Power Book with Jitter 1.6..it doesn’t work.
-a Power Book with Jitter 1.5..it works.
-A Pc with Ati Mobility 9700 and Jitter 1.5 ..it works.

The "funny" point is that if I copy on of the jit_gl_texture into a jit_matrix before sending it to slab obj ..it works ..(not sure I’m clear so here is the test..).

Bests

Pascal

max v2;
#N vpatcher 400 147 1505 926;
#P origin 0 -17;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 353 292 99 196617 jit.matrix @adapt 1;
#P user ubumenu 456 307 60 196617 0 1 1 0;
#X add pass;
#X add mult;
#X add div;
#X add add;
#X add sub;
#X add mod;
#X add min;
#X add max;
#X add abs;
#X add avg;
#X add absdiff;
#X add and;
#X add or;
#X add xor;
#X add not;
#X add gt;
#X add lt;
#X add gte;
#X add lte;
#X add eq;
#X add neq;
#X add gtp;
#X add ltp;
#X add gtep;
#X add ltep;
#X add eqp;
#X add neqp;
#X add sin;
#X add cos;
#X add tan;
#X add asin;
#X add acos;
#X add atan;
#X add atan2;
#X add sinh;
#X add cosh;
#X add tanh;
#X add asinh;
#X add acosh;
#X add atanh;
#X add exp;
#X add exp2;
#X add ln;
#X add log2;
#X add log10;
#X add hypot;
#X add pow;
#X add sqrt;
#X add ceil;
#X add floor;
#X add fract;
#X add normsin;
#X add normcos;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 481 333 111 196617 sprintf read op.%s.jxs;
#P newex 268 395 70 196617 jit.gl.slab foo;
#B color 5;
#P flonum 901 174 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 859 174 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 796 202 111 196617 pak param center 0. 0.;
#P flonum 718 177 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 718 203 73 196617 param amp $1;
#P flonum 636 177 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 636 203 75 196617 param freq $1;
#P message 533 204 95 196617 read td.sinefold.jxs;
#P newex 500 240 70 196617 jit.gl.slab foo;
#B color 5;
#P flonum 257 180 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 257 203 79 196617 param scale $1;
#P flonum 339 180 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 339 203 73 196617 param bias $1;
#P message 145 204 104 196617 read cc.scalebias.jxs;
#P newex 130 245 70 196617 jit.gl.slab foo;
#B color 5;
#P flonum 696 312 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 696 333 92 196617 param in2scale $1;
#P flonum 600 313 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 600 334 85 196617 param inscale $1;
#P message 563 77 28 196617 read;
#P message 628 77 27 196617 stop;
#P message 594 77 31 196617 start;
#P toggle 500 58 15 0;
#P newex 500 77 55 196617 metro 20;
#P newex 500 109 104 196617 jit.qt.movie 320 240;
#P newex 353 427 79 196617 jit.gl.handle foo;
#P newex 268 462 185 196617 jit.gl.videoplane foo @scale 1.333 1. 1.;
#P message 193 78 28 196617 read;
#P message 258 78 27 196617 stop;
#P message 224 78 31 196617 start;
#P toggle 130 59 15 0;
#P newex 130 78 55 196617 metro 20;
#P newex 130 110 104 196617 jit.qt.movie 320 240;
#P toggle 198 568 15 0;
#P message 198 586 45 196617 sync $1;
#P toggle 125 568 15 0;
#P newex 86 567 35 196617 sel 27;
#P message 125 586 68 196617 fullscreen $1;
#P newex 43 610 145 196617 jit.window foo @depthbuffer 1;
#P newex 41 567 40 196617 key;
#P user jit.fpsgui 42 203 60 196617 0;
#P number 65 76 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 20 76 15 0;
#P newex 20 102 55 196617 qmetro 20;
#P newex 20 152 55 196617 t b b erase;
#P newex 20 489 80 196617 jit.gl.render foo;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P fasten 1 2 0 0 69 185 25 185;
#P connect 1 1 5 0;
#P fasten 8 0 7 0 130 605 48 605;
#P fasten 11 0 7 0 203 605 48 605;
#P connect 4 0 2 1;
#P fasten 6 0 9 0 46 586 83 586 83 565 91 565;
#P fasten 9 0 10 0 91 585 122 585 122 565 130 565;
#P connect 10 0 8 0;
#P connect 15 0 14 0;
#P fasten 16 0 13 0 229 104 135 104;
#P fasten 17 0 13 0 263 104 135 104;
#P fasten 18 0 13 0 198 104 135 104;
#P fasten 14 0 13 0 135 104 135 104;
#P fasten 33 0 31 0 344 226 135 226;
#P fasten 32 0 31 0 150 226 135 226;
#P fasten 35 0 31 0 262 226 135 226;
#P connect 13 0 31 0;
#P connect 12 0 11 0;
#P connect 36 0 35 0;
#P connect 47 0 46 0;
#P connect 27 0 46 0;
#P connect 29 0 46 0;
#P connect 31 0 46 0;
#P connect 20 0 19 0;
#P connect 46 0 19 0;
#P connect 49 0 46 1;
#P connect 34 0 33 0;
#P connect 37 0 49 0;
#P connect 48 1 47 0;
#P connect 23 0 22 0;
#P fasten 22 0 21 0 505 103 505 103;
#P fasten 26 0 21 0 568 103 505 103;
#P fasten 25 0 21 0 633 103 505 103;
#P fasten 24 0 21 0 599 103 505 103;
#P fasten 38 0 37 0 538 226 505 226;
#P fasten 39 0 37 0 641 227 505 227;
#P fasten 41 0 37 0 723 225 505 225;
#P fasten 43 0 37 0 801 226 505 226;
#P connect 21 0 37 0;
#P connect 28 0 27 0;
#P connect 40 0 39 0;
#P connect 30 0 29 0;
#P connect 42 0 41 0;
#P connect 44 0 43 2;
#P connect 45 0 43 3;
#P pop;


July 18, 2006 | 3:59 pm

So ..sorry for the the noise..I finaly got those patches working by sending the message "glreadback fbo" to Jitter..(coming back to "glreadback rtt" ..makes the slab obj act like if there were only one input).

Pascal


July 18, 2006 | 5:51 pm

On Jul 18, 2006, at 8:59 AM, pascal wrote:

>
> So ..sorry for the the noise..I finaly got those patches working
> by sending the message "glreadback fbo" to Jitter..(coming back to
> "glreadback rtt" ..makes the slab obj act like if there were only
> one input).

Thanks for the report. I’ve verified and will try to fix for the next
beta.

-Joshua


Viewing 5 posts - 1 through 5 (of 5 total)