Gio,
To write more complex shaders, a lot of the examples I see on the web use function inside the shader. For example:
/* shader code */
float offset(float p) {
return p 10.0;
}
// rest of shader code here
It seems like this would be acceptable since in wade you are just passing a sting. Howerver, when I try it, I get the following error:
An error occurred compiling a pixel shader: ERROR: 0:8: '{' : syntax error
I didn't look at the source code to see how it is doing the parsing, and I am still using wade 3.0, so I don't know if this change has already been made. But it seems like you should have the ability to define functions in you shader strings.
cheers,
Shri