GLSL Uniforms

Hi there!

What is the basic difference between writing sInput0 and sTD2DInputs[0]?
I’ve noticed that lot of shaders stop working if sInput0 is replaced with STD2DInputs[0],
this is confusing me a bit.

I’m on windows10 /w 099 and I’m experiencing this with GLSL Top and GLSL Multi Top

thanks!

It depends on the GLSL version you are compiling with, as selected in the nodes parameters. sInput0 is for GLSL 1.20 only. sTDInputs[] is for GLSL 3.30 and everything above that.

that’s fine but my issue with non-working shaders happens with versions above 3.30,
they works fine with sInput0 but not working (chessboard blue/red) with sTD2DInputs[0]
:frowning:

Do you have inputs connected to the node? Those uniforms arn’t declared if nothing is connected in GLSL 3.30+

Yes sure,

I’m eyeballing and it seems everything ok but sTD2DInputs still seems broken and really can’t figure out why.
I’m doing nVoid shaderToy-TD tutorials and for example, there is no way to make the second one ,Shard, working.

I’m on Windows10 / TD099 / GTX960M
Exercise02_24Jul17.toe (12.7 KB)

It only works close to the original if Noise Top has up to 1280x1280 resolution, like the resolution of the shader depends on Noise TOP instead of cubemap