jit.gl.pix texture glueing/combining


    May 16 2014 | 9:32 pm
    Hi there, I'm bumping my head into the wall trying to glue textures together using jit.gl.pix. I have 3 1x24 textures that I want to combine into 1 3x24 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?

    • May 16 2014 | 9: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 | 5:42 pm
      i gave it a try: somehow i have the feeling its not the most efficient way :-) but its working...
    • May 19 2014 | 10:18 am
      Great, tanx! Now let's test it in the big patch...
    • May 19 2014 | 12:29 pm
      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:
      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?
    • May 19 2014 | 3:25 pm
      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.
    • May 19 2014 | 3:26 pm
      (for some reason I can't post my compressed code here, I just get directed to a blank page...)
    • Jan 25 2016 | 1:12 am
      Any chance in uploading that patch again DTR? Thanks!
    • Jan 25 2016 | 6:44 pm
      Sure. Posting this particular copy-compressed code on the forum still seems buggy so I attached a zip.
    • Dec 19 2016 | 10:06 pm
      Cool patch!