Hey guys and girls,
i tried to port a shader from shadertoy to touchdesigner but touchdesigner doesn’t want to accept my variables i am using:
this is the shader i want to import:
shadertoy.com/view/MlG3WG
this is what i found so far for porting shaders from shadertoy to touchdesigner:
nvoid.gitbooks.io/introduction- … ertoy.html
saying
“Samplers
Shadertoy has named their sampler inputs iChannels.These samplers can be images, videos, noise patterns, cube mabs, etc. The ‘GLSL’ TOP has a similar variable called sTD2DInputs. The Shadertoy samplers are individual numbered samplers, such as iChannel0 and iChannel1. In TouchDesigner, sTD2DInputs is an array, so you can access an elements with a numeric index.
Now, search through the code and wherever there is the a reference to iChannel0, replace that with sTD2DInputs[0]. Where there is a reference to iChannel1, replace that with sTD2DInputs[1].”
i’m stuck at the sampler inputs. i tried to change channel0 to sTD2DInput[0] but the info window connected to the glsl gives me an error: undefined variable “sTD2DInputs”
Anyone knows why touchdesigner doesn’t accept the variable sTD2DInput[0] as channel0 in this code?
i know, i know, there is a edge top in TD doing similar but i want to understand the way porting shaders from shadertoy to TD
thanks,
SCatur