[SOLVED] 2025.32280: GLSL POP reading wrong values from uniforms

it looks like the GLSL POP is sometimes reading wrong values from Vectors (auto-declared as uniforms).

In screenshot:
uStiffness is 9.8, but it writes 131 to the attribute debug(0)
uRestDensity is 2.7, but it writes 20 to the attribute debug(1)

See attached file with smallest possible network with reproducible bug

pop-uniform-bug.toe (4.1 KB)

It’s hard to pinpoint when this happens - seems when you recreate the vectors the issue goes away.

To extend on this, it also happens on my system (win11, 2025.32280, 2080ti). The weird thing is if you drop down a new glslPOP, then setting the parameters exactly the same & same code, it does work.
Here’s a tox version of two identical glslPOPs, top one is idzards not working one, bottom one is created new with same code & parameters and does seem to work.

Cheers,
tim

GLSLWeirdness.tox (1.1 KB)

1 Like

Hello @nettoyeur and @timgerritsen

In your examples, it seems that the uniforms that fail to map correctly to the shader have trailing space characters (e.g., “uStiffness ” and “uRestDensity ”). Adding a warning when this happens or truncating the name might help. We’ll investigate further.

2 Likes

oh dear.
Apologies. That’ll teach me to stop coding when it’s too late at night :sweat_smile:

Thanks @Guillaume.L !

No worries. In the next build we release, the space characters will be trimmed from the uniform names.

1 Like