Ability to pass arbitrary data into ShaderToys

unicode's picture

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.

Component: 

Pages

Subscribe to RSS - Shader