RESOLVED: 22880 - GLSL and multiple color buffer selection

Heya

I’m trying to use a GLSL TOP and render selects to grab 2 different color buffers. Just seems broken to me (the render select that is supposed to get the seconds buffer is just giving the first). Maybe I’m overlooking something, but I think I boiled it down to just about as simple as possible.

File attached, should be pretty self explanatory. This is Win7-64, nVidia Titan 337.xx.

Thanks

Peter
GLSL_multi_buffer_bug.toe (4.03 KB)

Edit: Your project didn’t work in 16360 when I tested it, but mine seemed to still work.

My pc doesn’t have internet at the moment, but it works when I use the code I’d normally use:

layout(location = 0) out vec4 fragColor[2];

void main() {
    fragColor[0] = texture(sTD2DInputs[0], vUV.st);
    fragColor[1] = texture(sTD2DInputs[1], vUV.st);

}

I’m no glsl expert by any means though, so not sure if the issue is the uniforms or what…

1 Like

Yes, the uniform names for samplers has changed in GLSL 3.30. sTD2DInputs[] is now an array of all the 2D inputs connected to the TOP. sInput1 etc is no longer used or functional.