Ability to pass arbitrary data into ShaderToys

Often, in order to get a ShaderToy to respond to external control parameters as desired, I find myself coming up with encoding schemes in order to pass data into the shader using the “Time” and “Mouse Position” inputs to carry information which have nothing to do with the time or the mouse position.

I suppose I could also come up with ways to encode this data into the input images. :)

But it would be great if the Make Image With Shadertoy node had another input, which takes some kind of arbitrary data, which can be accessed by the shader code.

A Tree object would seem to be perfect and versatile, but tree values are all text and as far as I know GLSL doesn’t provide facilities for strings. :( So if providing structured data to shaders is unfeasible, a list of ints or floats or vec3’s would be the next greatest thing.

@unicode, yeah, it would be useful to be able to pass additional parameters to the shader. Although not ShaderToy exactly, this will be made possible with Ability to edit GLSL shader code in Vuo Editor.

1 Like

Sounds like that’s exactly what I was hoping for. Thanks! :)

1 Like