// Example ShaderToy shader for testing convert_shadertoy.py // Simple animated gradient effect // // Test with: // ./tools/shadertoy/convert_shadertoy.py tools/shadertoy/example.txt Rainbow void mainImage(out vec4 fragColor, in vec2 fragCoord) { // Normalized pixel coordinates (from 0 to 1) vec2 uv = fragCoord / iResolution.xy; // Center coordinates vec2 center = uv - 0.5; // Distance from center float dist = length(center); // Animated rainbow colors vec3 col = 0.5 + 0.5 * cos(iTime + dist * 10.0 + vec3(0.0, 2.0, 4.0)); // Pulsing effect col *= 1.0 + 0.2 * sin(iTime * 2.0); // Output to screen fragColor = vec4(col, 1.0); }