Ashley
It take me 5 minutes to convert the basic Shadertoy shader to C3 ... it's long !! And what about the \n for every lines ??... the C3 fx is unreadable ... or effects sdk will simple ? The only advantage is the removed .xml file.
I have quickly madea converter <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">
http://gigatron3k.free.fr/html5/C3/FX/sttc3/
Thanks
Here is a simple conversion :
Shadertoy ;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
fragColor = vec4(uv,0.5+0.5*sin(iGlobalTime),1.0);
}[/code:yjmwzgvd]
C3 shader :
[code:yjmwzgvd]
cr.shaders = {};
cr.shaders ["myfx"] = {"src":"#ifdef GL_ES
precision mediump float;\n
#endif
// Construct base uniforms .........
uniform mediump sampler2D samplerFront;\n
varying mediump vec2 vTex;\n
uniform mediump float seconds;\n
uniform mediump float date;\n
uniform mediump float pixelWidth;\n
uniform mediump float pixelHeight;\n
vec2 iResolution = vec2( 1./pixelWidth, 1./pixelHeight);\n
uniform mediump float speed;\n
void main()\n
{\n
vec2 uv = vTex;\n
gl_FragColor = vec4(uv,0.5+0.5*sin(seconds*speed),1.0);\n
}","extendBoxHorizontal":0,"extendBoxVertical":0,"crossSampling":false,"preservesOpaqueness":false,"animated":true,"parameters":[["speed",0,1]]};
[/code:yjmwzgvd]