Here's one that may be helpful during development when using Chrome.
function FSTR(f) {
// remove up to comment start and trailing spaces and one newline
s = f.toString().replace(/^.*\/\* *\r?\n/,"");
// remove the trailing */} with preceeding spaces and newline
s = s.replace(/\n *\*\/\s*\}\s*$/,"")
return s;
}
s = FSTR(function(){/*
uniform vec2 resolution;
uniform float time;
void main(void)
{
vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / resolution.xy;
vec2 cc = vec2( cos(.25*time), sin(.25*time*1.423) );
...
float color = sqrt(sqrt(dmin))*0.7;
gl_FragColor = vec4(color,color,color,1.0);
}
*/});
This does not work for Firefox, although it works in Chrome.
Example use would be for writing/testing webgl shaders.
During development this is much nicer to work with and
later you can always run over this with a simple regexp
that converts that syntax into a cross-browser version.