I wrote a shading language virtual machine for a ray-tracer. Mainly I developed it to support basic operations that are usually done over un-textured surfaces but I don't think it's enough for you.. You can dowload the manual of my language here.
If you think you are interested I can give you the code (written in C/C++) or some hints..
Jack
2010-10-08 21:18:07