I definitely wouldn't want it to be a parameter for drawing operations. It should be, in some way, a part of a per-object and/or global (default) state.
Hmm...as far as per-image shaders, it would also be good to be able to set the current shader for all drawing. Perhaps as well to specify different default shaders for textured and un-textured drawing?
For how a shader would look out of script proper, I've been looking at
Byuu's Quark for instpiration and guidance. I like the idea of a simple manifest file that specifies shader files that compose the shader program. It could also be used to specify certain whether or not to supply certain uniforms to the shader.
What about on the GLSL side? Again, I've been looking at Quark, but I'm not sure about having variable output size. I would like having most of the uniforms that are exposedm, though.
EDIT:
I have to add, this recent bit about of first working on the MapEngine, then the SpriteBatch, and now upgrading the OpenGL version and adding shaders isn't just some bout of lack of concentration or me having a very short attention span.
These are all related issues and concepts. The SpriteBatch is a backend for the MapEngine, which will automate a lot of graphical portions (and several optimizations) for the MapEngine, as well as provide this feature to script. But it works like modern OpenGL does--more like the map engine, less like the normal drawing API of Sphere. And when I switched to OpenGL, I made certain assumptions and decisions of how to do it that really only facilatated the drawing API, which works a lot like OpenGL immediate mode. Which was deprecated in OpenGL eight years ago.
It will probably be best to just get this all done in one clean pass. Remove the deprecated immediate-mode code by switching to OpenGL buffers and arrays, add shaders, and implement a generic texture atlasing and OpenGL array generator. This will make the SpriteBatcher much more efficient, give TurboSphere a much more modern OpenGL implementation, which will also be better suited to the SpriteBatcher, which will make the map engine easier to implement. It's just layers of me discovering what should be done before I work on what I originally planned on doing.
I'm trying to fix fundamental shortcomings and limitations of the current implementation of TurboSphere.