{
    "name": "Kaleidoscope",
    "description": "Kaleidoskop-Spiegelung mit Farbrotation",
    "vertex_shader": "attribute vec2 a_position;\nvoid main() {\n    gl_Position = vec4(a_position, 0.0, 1.0);\n}",
    "fragment_shader": "precision mediump float;\nuniform float u_time;\nuniform vec2 u_resolution;\nuniform vec2 u_mouseNorm;\nuniform float u_zoom;\n\nfloat hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }\n\nvoid main() {\n    vec2 uv = (gl_FragCoord.xy - 0.5*u_resolution.xy) \/ u_resolution.y;\n    uv *= u_zoom;\n    float angle = atan(uv.y, uv.x);\n    float radius = length(uv);\n    float segments = 8.0;\n    angle = mod(angle, 6.2831 \/ segments);\n    angle = abs(angle - 3.14159 \/ segments);\n    vec2 kuv = vec2(cos(angle), sin(angle)) * radius;\n    float t = u_time * 0.3;\n    vec2 p = kuv * 3.0 + vec2(t, t*0.5);\n    float pattern = sin(p.x * 5.0) * sin(p.y * 5.0);\n    pattern += sin(p.x * 10.0 + t) * sin(p.y * 10.0 - t) * 0.5;\n    pattern = pattern * 0.5 + 0.5;\n    vec3 col = vec3(0.5 + 0.5*cos(t + pattern*6.28 + vec3(0.0, 2.0, 4.0)));\n    col *= smoothstep(2.0, 0.0, radius);\n    float mouseDist = length(uv - (u_mouseNorm - 0.5) * vec2(u_resolution.x\/u_resolution.y, 1.0));\n    col += vec3(1.0, 0.8, 0.2) * smoothstep(0.2, 0.0, mouseDist) * 0.5;\n    gl_FragColor = vec4(col, 1.0);\n}"
}