Beyond super weird, not getting errors in the info DAT with this bug, the glsl TOP just simply stops updating internally, even if there are parameters in uniforms causing the node itself to cook every frame.
Basically, the gist of what I’m doing is comparing two values to each other, value A sampled from a chop, value B sampled from a top input.
I then take that comparison (using ==) and convert it to a float(), then in some way write it out to the buffer.
The part that makes it even more strange, is there is several very specific edge cases that when also met either make it work, or make it not work.
For instance, if you disconnect one of the top inputs (the second one for instance, isn’t even being sampled) it begins to work again, or if you specify a texture input index via a variable vs a raw integer, etc. this causes it to stop working.
Here’s the entire code from the glsl:
uniform samplerBuffer Proj_Params;
uniform float selectionPulse;
out vec4 fragColor;
void main()
{
// just initializing some things.
vec4 color = vec4(0.0);
float asdFloat = 0.2;
// notice I'm providing the index to "sTD2DInputs" using this int. If you place an int, like 0 into
// the brackets below.. the glsl code starts to work again.
int inputID = 0;
// all that's happening here is I'm sampling a value from a chop input, and another value from a top input,
// then comparing the two using "==" and then converting that resulting boolean to a float.
asdFloat = float( texelFetch( Proj_Params , 35 ).x == texture( sTD2DInputs[ inputID ], vec2( 0.5 , 0.5 ) ).x );
///////////// try commenting out the above line, the glsl code will start working magically. ///////////////////
// just writing stuff out so we can see it.
color.r += selectionPulse *.5;
color.g = asdFloat;
fragColor = TDOutputSwizzle(color);
}
I’ve made ample notes, and attached a file.
theStrangestGLSLBug.2.toe (10.5 KB)