GLSL Shader / Error: Index 1 Beyond bounds

Hi Guys,

I’m quite new on TD and Shader so probably my mistake is obvious however I can figure it out what I’m doing wrong.

I’m trying to convert this shader from shadertoy: shadertoy.com/view/lsBcRK.

After converting BufA, BufB and Image and connecting everything together on Info DAT occurs this error:

ERROR: 0:16: Index 1 beyond bounds (size 1)
ERROR: 0:56: Use of undeclared identifier ‘noise’

If I understand correctly this means that the BufA doesn’t have incoming texture but I don’t understand why as I think I connected everything like the original Shader on Shadertoy.

Someone can help?

Attached here my .toe
Coruscating Clouds.2.toe (5.34 KB)

The first error -
ERROR: 0:16: Index 1 beyond bounds (size 1)

… is because you’re trying to sample sTD2DInputs[1] but you have only one input to your GLSL TOP, thus the array sTD2DInputs[] has a length of 1 and index 1 is out of bounds.

The second error -
ERROR: 0:56: Use of undeclared identifier ‘noise’
… is because your declaration of the variable ‘noise’ failed on line 16.

Also - NB - TD has a builtin vUV that has your uv values in there so you don’t need to compute it from gl_FragCoord.

Also TD has builtin uTD2DInfos[TD_NUM_2D_INPUTS], which contains the resolution of the inputs, so you don’t have to pass that in as a uniform yourself.

Check out derivative.ca/wiki099/index. … a_GLSL_TOP for documentation of those and some other handy builtins.