diff options
Diffstat (limited to 'tools/shadertoy/example.txt')
| -rw-r--r-- | tools/shadertoy/example.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/shadertoy/example.txt b/tools/shadertoy/example.txt new file mode 100644 index 0000000..e0287de --- /dev/null +++ b/tools/shadertoy/example.txt @@ -0,0 +1,25 @@ +// 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); +} |
