ShaderToy to Touch designer Converter

ShaderToy to Touch designer Converter

Here is a little something we (by WE I mean my colleague Sebastien Gravel from Création Ex Nihilo) did to ease the pain while trying out shaders from Shadertoy.com for the first time in TD.

This patch converts the shader code found on the website shadertoy.com and makes it usable in Touchdesigner.

Copy the program shader code from the website in the shaderProgram DAT.

Notice

Works with 60% of the shadertoy.com available.
The texture use on shadertoy.com must be reimported in touchdesigner and assigned to the input of the glsl TOP.
Basic uniform like iResolution, iMouse and iGlobalTime are already assign in the uniform section of the glsl TOP, if some shaders use other types of uniforms, those should be added by hand.

Audio input doesn’t work for now.

Bug

Some shader don’t compile correctly with raymarching and textureCube, feel free to experiement and look if a solution is available or if this is a Touchdesigner limitation of the sampler type.

To get the patch go to our Github or download straight from here:

github.com/SebastienGravel/Shad … chdesigner
ShaderToyTouchdesigner.toe (11 KB)

This is awesome thank you!

nice one! thanks.

One of the most common errors I always see when trying to port shadertoy stuff is something like this:

Program Link Results:
Fragment info

(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined

any ideas?

some run with the “void mainImage()” and some with that method don’t strangely.

mainImage() needs to be renamed to main()

1 Like

I want to be able to do stuff like this when I grow up :slight_smile:

Ahh, thanks Malcom!

Hello, I have noticed that some of the shaders use a channel from the channel picker down bellow the code . It is mostly noise ,sooo i was wondering if there is a way to use a Noise Top and somehow convert that information into a code reference and write it in the code itself.

Thanks a lot Guillaume. It saves a lot of time.

WOW , Fantastic !

Thanks for this. Really helpful

What do you mean by mainImage() needs to be renamed to main().
could you develop a bit? thx

I dont even see any traces of a mainImage in the code.

(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined
(0) : error C3001: no program defined

If youre looking for more explanation on how to convert Shadertoy shaders to TouchDesigner and why certain things change, Matt wrote a great chapter on it here. Might answer your question.

nvoid.gitbooks.io/introduction- … ertoy.html

great thx,I forgot about that page!

Great little tool, thank you!