Forums > Gen

jit.gl.pix texture glueing/combining


dtr
May 16, 2014 | 2:32 pm

Hi there,
I’m bumping my head into the wall trying to glue textures together using jit.gl.pix. I have 3 1×24 textures that I want to combine into 1 3×24 texture. (In my actual app I need to combine 19 textures)

For my particular use I need it done on the GPU and I can’t do it on screen/in the render window with multiple videoplanes.

Below’s what I ‘ve been trying. Any ideas?

– Pasted Max Patch, click to expand. –
  • This topic was modified 2 months by  dtr.


dtr
May 16, 2014 | 2:34 pm

Oh yes, Im also getting a GLSL error that I don’t understand:

-- START GLSL INFO LOG: fp --
ERROR: 0:127: 'switch' : Reserved word. 
ERROR: 0:127: 'switch' : syntax error syntax error
-- END GLSL INFO LOG: fp --
jit.gl.shader: GLSL program failed to compile.
-- START GLSL INFO LOG: fp --
ERROR: 0:127: 'switch' : Reserved word. 
ERROR: 0:127: 'switch' : syntax error syntax error
-- END GLSL INFO LOG: fp --
jit.gl.shader: GLSL program failed to compile.

May 17, 2014 | 10:42 am

i gave it a try: somehow i have the feeling its not the most efficient way :-) but its working…

– Pasted Max Patch, click to expand. –


dtr
May 19, 2014 | 3:18 am

Great, tanx! Now let’s test it in the big patch…



dtr
May 19, 2014 | 5:29 am

Bummer… jit.gl.pix can only have up to 8 inputs, so for 19 I have to create 3 submatrices and then glue those together. Should be able to work that out now.

There’s a thing I don’t understand inside the gen objects:

– Pasted Max Patch, click to expand. –

Why the * 2 – 1? The outputs 0 and 1 from && remain 0 and 1 after the calculation. Though if I remove it the glueing doesn’t work as expected. What am I missing here?



dtr
May 19, 2014 | 8:25 am

Here it is adapted for 19 inputs, in 2 steps. Perhaps useful for someone sometime. I optimized out some superfluous checks from Tobias’ original solution too.



dtr
May 19, 2014 | 8:26 am

(for some reason I can’t post my compressed code here, I just get directed to a blank page…)


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