sTD2DInput error in importing ShaderToy to TD

Hi,

I imported this shader (fluid simulation) : shadertoy.com/view/4tGfDW to TD. In the first attempt I imported all buffers code into one glsl TOP. The code compiled but no result. which I think it’s obvious because I didn’t input the channels right. In this attempt I put each buffer in a seperate glsl TOP and I input the channels based on what it was on the website. But I think I still don’t quiet understand the sTD2DInput. How do I input data from one glsl to another?

Thanks,
Parvin
importShaderToy.4.toe (6.62 KB)

That’s because it needs to be sTD2DInputs (note the ‘s’ at the end).

Oh thanks for your huge help! I finally compiled all the code but there is still a problem. The colors are changing as I move the mouse. But it seems like the FluidSolve function is not working (so there is no flow or dissolve in fluid). What I previously did was putting all the common code (calculation) into Buffer A to C. Do I have to separate the calculation from buffers and put it in a glsl TOP and export the data to buffers? I have no idea how to do that.
I attached the updated file.

Thanks,
P
importShaderToy.7.toe (6.77 KB)

A few things. That yellow error flag on Buffer A that is talking about loop dependencies, you need to fix that by using a Feedback TOP. The Feedback TOP needs to reference Buffer C. Put a null after C, and reference that. Buffer D’s second input is also itself (you have it current wired up to C), so that will need a Feedback TOP as well.

Your iResolution should match the resolution of the GLSL TOP.

iFrame is just checking whether it’s above or below frame 20. So you don’t even really need to continuously count the frames. Any number 20 and below will reset to blank, any number above will begin the shader.

A good way to reference the same code (in this case “common”) is put that code in it’s own text dat called “common”, and at the top of each GLSL top’s pixel shader write: #include .