Side-by-side combine TOPs tox

In the multiple monitors docs it says “TouchDesigner will run fastest in Perform Mode if you combine all your panels into one Window COMP.” This tox does that using a GLSL Multi TOP to place inputs side-by-side in a single TOP. Width is determined automatically from the inputs. Height is the maximum input height.

Hope someone else finds this useful!
sidebyside.tox (854 Bytes)

Cool, works well, thanks for the share!

I’ve been searching for this! When i pop this into my network it doesn’t work as planned. I’m trying to place three equally-sized textures next to each other. When all three are connected to the glslmulti, only the first one shows up all the way to the right of the new texture. If I add another TOP, the output res expands as expected, but now, the 2nd texture appears. So the first two “slots” of the output texture are always blank.

When only one TOP is connected it works fine. When two TOPS are connected, the double-width output texture is blank.

What’s your OS and build?

Works correctly for me on a win 10, Touch 088 setup.
Also seems to work correctly on win 10 and Touch 099.

If you’re on a Mac you’ll likely need to change the last line:

fragColor = color;

to

fragColor = TDOutputSwizzle(color);

Finally, are you seeing any error messages in the info DAT? Sometimes errors there can be help in determining where things are going wrong.

thanks for this. I’m on macOS 10.12 Touch 099 Commercial. I tried the TDOutputSwizzle(color); and got the same result. I don’t see any errors in the info dat.

here is the shader code

// uniform float exampleUniform;

out vec4 fragColor;
void main()
{
  vec2 uv = uTDOutputInfo.res.zw * vUV.xy;
  vec4 color = vec4(0);
  float mult = 0;
  float soFar = 0;
  for(int i = 0; i < TD_NUM_2D_INPUTS; ++i) {
    mult = step(soFar, uv.x);
    color += texelFetch(sTD2DInputs[i], ivec2(uv) - ivec2(soFar, 0), 0) * mult;
    soFar += uTD2DInfos[i].res.z;
  }

  fragColor = TDOutputSwizzle(color);
}

I’ve uploaded a screenshot of the setup, as well as a new .tox, in case i may have changed anything. Are there any other mac-specific things i should be looking out for?

thanks in advance.
sidebyside_jm.tox (950 Bytes)

hmmmm…

I’m vaguely remembering an issue I had with texelFetch() between windows and mac. You might try replacing that with a texture() approach instead.

If you’re using the experimental build of 099 there’s a new TOP called Layout (I think) that does almost the same thing.

i couldn’t get it with texture either… i ended up using your (@raganmd) container technique and learned about the opviewer TOP (duh!). I have what i need now.

Just got a chance to test this on a 2013 macbook with a recent build and it was working.

Might be a video card or driver?

How strange… I just tested on my MBP 2013 which has a nvidia 650m and it worked fine. The machine in question is a 2012 mac pro with a GTX1080. I’ll be sure to check which driver i’m using and if there is an alternate driver that would fix the issue.

thank you, it works fine.