[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M748P3J1Y79XV7QFCCXAWG2Y":3,"skill-same:01M748P3J1Y79XV7QFCCXAWG2Y":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M748P3J1Y79XV7QFCCXAWG2Y","shadertoy",null,"Write, debug, and optimize Shadertoy shaders and GLSL fragment shaders for procedural graphics. Use when creating visual effects, generative art, or WebGL shaders; when writing .glsl files; or when user says \"write a shader\", \"make a Shadertoy effect\", \"help with GLSL\", or \"create a procedural animation\".","surfingalien\u002FFinSurfing","surfingalien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F138259559?v=4","01M71XACCFHNXK70BHYFHFT657","01M71XACDJSV4YA5NZ191F1C8C",1,"MIT","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fshadertoy\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: shadertoy\ndescription: Write, debug, and optimize Shadertoy shaders and GLSL fragment shaders for procedural graphics. Use when creating visual effects, generative art, or WebGL shaders; when writing .glsl files; or when user says \"write a shader\", \"make a Shadertoy effect\", \"help with GLSL\", or \"create a procedural animation\".\n---\n\n# Shadertoy Shader Development\n\n## Overview\n\nShadertoy is a platform for creating and sharing GLSL fragment shaders that run in the browser using WebGL. This skill provides comprehensive guidance for writing shaders including GLSL ES syntax, common patterns, mathematical techniques, and best practices specific to real-time procedural graphics.\n\n## When to Use This Skill\n\nActivate this skill when:\n- Writing or editing `.glsl` shader files\n- Creating procedural graphics, generative art, or visual effects\n- Working with Shadertoy.com projects or WebGL fragment shaders\n- Implementing ray marching, distance fields, or procedural textures\n- Debugging shader code or optimizing shader performance\n- Need GLSL ES syntax reference or Shadertoy input variables\n\n## Core Concepts\n\n### Shader Entry Point\n\nEvery Shadertoy shader implements the `mainImage` function:\n\n```glsl\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord)\n{\n    \u002F\u002F fragCoord: pixel coordinates (0 to iResolution.xy)\n    \u002F\u002F fragColor: output color (RGBA, typically alpha = 1.0)\n\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    fragColor = vec4(uv, 0.0, 1.0);\n}\n```\n\n### Shadertoy Built-in Inputs\n\nAlways available in shaders:\n\n| Type | Name | Description |\n|------|------|-------------|\n| `vec3` | `iResolution` | Viewport resolution (x, y, aspect ratio) |\n| `float` | `iTime` | Current time in seconds (primary animation driver) |\n| `float` | `iTimeDelta` | Time to render one frame |\n| `int` | `iFrame` | Current frame number |\n| `vec4` | `iMouse` | Mouse: xy = current position, zw = click position |\n| `sampler2D` | `iChannel0`-`iChannel3` | Input textures\u002Fbuffers |\n| `vec3` | `iChannelResolution[4]` | Resolution of each input channel |\n| `vec4` | `iDate` | Year, month, day, time in seconds (.xyzw) |\n\n### Coordinate System Setup\n\nStandard patterns for normalizing coordinates:\n\n```glsl\n\u002F\u002F Aspect-corrected UV centered at origin (-1 to 1, aspect-preserved)\nvec2 uv = (fragCoord.xy - 0.5 * iResolution.xy) \u002F min(iResolution.y, iResolution.x);\n\n\u002F\u002F Alternative compact form:\nvec2 uv = (fragCoord * 2.0 - iResolution.xy) \u002F min(iResolution.x, iResolution.y);\n\n\u002F\u002F Simple normalized (0 to 1)\nvec2 uv = fragCoord \u002F iResolution.xy;\n```\n\n## Common Shader Patterns\n\n### 1. Procedural Color Palettes\n\nUse Inigo Quilez's cosine palette for smooth color gradients:\n\n```glsl\nvec3 palette(float t, vec3 a, vec3 b, vec3 c, vec3 d) {\n    return a + b * cos(6.28318 * (c * t + d));\n}\n\n\u002F\u002F Example usage:\nvec3 col = palette(\n    t,\n    vec3(0.5, 0.5, 0.5),    \u002F\u002F base\n    vec3(0.5, 0.5, 0.5),    \u002F\u002F amplitude\n    vec3(1.0, 1.0, 0.5),    \u002F\u002F frequency\n    vec3(0.8, 0.90, 0.30)   \u002F\u002F phase\n);\n```\n\n### 2. Hash Functions (Pseudo-Random)\n\nSimple 2D hash for noise and randomness:\n\n```glsl\nfloat hash21(vec2 p) {\n    p = fract(p * vec2(234.34, 435.345));\n    p += dot(p, p + 34.23);\n    return fract(p.x * p.y);\n}\n```\n\n### 3. Ray Marching\n\nStandard pattern for 3D rendering via sphere tracing:\n\n```glsl\n\u002F\u002F Distance field function\nfloat map(vec3 p) {\n    return length(p) - 1.0;  \u002F\u002F Sphere at origin, radius 1\n}\n\n\u002F\u002F Normal calculation\nvec3 calcNormal(vec3 p) {\n    vec2 e = vec2(0.001, 0.0);\n    return normalize(vec3(\n        map(p + e.xyy) - map(p - e.xyy),\n        map(p + e.yxy) - map(p - e.yxy),\n        map(p + e.yyx) - map(p - e.yyx)\n    ));\n}\n\n\u002F\u002F Ray marching loop\nvec3 render(vec3 ro, vec3 rd) {\n    float t = 0.0;\n    for (int i = 0; i \u003C 100; i++) {\n        vec3 p = ro + rd * t;\n        float d = map(p);\n        if (d \u003C 0.001) {\n            \u002F\u002F Hit - calculate lighting\n            vec3 n = calcNormal(p);\n            return n * 0.5 + 0.5;  \u002F\u002F Normal visualization\n        }\n        if (t > 10.0) break;\n        t += d * 0.5;  \u002F\u002F Step (0.5 factor for safety)\n    }\n    return vec3(0.0);  \u002F\u002F Miss\n}\n```\n\n### 4. Rotations\n\n2D rotation:\n```glsl\nmat2 rot2d(float a) {\n    float c = cos(a), s = sin(a);\n    return mat2(c, -s, s, c);\n}\n\u002F\u002F Usage: p.xy *= rot2d(iTime);\n```\n\n3D axis-angle rotation (modifies in-place):\n```glsl\nvoid rot(inout vec3 p, vec3 axis, float angle) {\n    axis = normalize(axis);\n    float s = sin(angle), c = cos(angle), oc = 1.0 - c;\n    mat3 m = mat3(\n        oc * axis.x * axis.x + c,           oc * axis.x * axis.y - axis.z * s,  oc * axis.z * axis.x + axis.y * s,\n        oc * axis.x * axis.y + axis.z * s,  oc * axis.y * axis.y + c,           oc * axis.y * axis.z - axis.x * s,\n        oc * axis.z * axis.x - axis.y * s,  oc * axis.y * axis.z + axis.x * s,  oc * axis.z * axis.z + c\n    );\n    p = m * p;\n}\n```\n\n### 5. Domain Repetition and Folding\n\nCreate fractal-like structures:\n\n```glsl\nvec3 foldRotate(vec3 p, float timeOffset) {\n    for (int i = 0; i \u003C 5; i++) {\n        p = abs(p);  \u002F\u002F Mirror fold\n        rot(p, vec3(0.707, 0.707, 0.0), 0.785);\n        p -= 0.5;    \u002F\u002F Translate\n    }\n    return p;\n}\n```\n\n### 6. Post-Processing\n\nVignette:\n```glsl\nfloat vignette(vec2 uv) {\n    uv *= 1.0 - uv.yx;\n    return pow(uv.x * uv.y * 15.0, 0.25);\n}\n```\n\nFilm grain\u002Fdithering (reduces banding):\n```glsl\nfloat dither = hash21(fragCoord + iTime) * 0.001;\nfinalCol += dither;\n```\n\nGamma correction:\n```glsl\nfinalCol = pow(finalCol, vec3(0.45));  \u002F\u002F ~1\u002F2.2\n```\n\n## Multi-Pass Rendering\n\nFor complex effects requiring temporal feedback or multiple rendering stages:\n\n### Buffer A (Computation):\n```glsl\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    \u002F\u002F Generate or compute values\n    fragColor = vec4(computedColor, 1.0);\n}\n```\n\n### Buffer B (Feedback\u002FBlending):\n```glsl\n#define BUFFER_A iChannel0\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    vec4 current = texture(BUFFER_A, uv);\n    vec4 previous = texture(iChannel1, uv);  \u002F\u002F Self-reference\n    fragColor = mix(previous, current, 0.1);  \u002F\u002F Temporal blend\n}\n```\n\n### Main (Final Output):\n```glsl\n#define BUFFER_B iChannel1\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    fragColor = texture(BUFFER_B, uv);\n}\n```\n\n## Critical GLSL ES Rules\n\n**ALWAYS follow these rules to avoid compilation errors:**\n\n1. **NO `f` suffix**: Use `1.0` NOT `1.0f`\n2. **NO `saturate()`**: Use `clamp(x, 0.0, 1.0)` instead\n3. **Protect pow\u002Fsqrt**: Wrap arguments: `pow(max(x, 0.0), p)`, `sqrt(abs(x))`\n4. **Avoid division by zero**: Check denominators or add epsilon\n5. **Initialize variables**: Don't assume default values\n6. **Avoid name conflicts**: Don't name functions like variables\n7. **NO interactive commands**: Avoid `find`, `grep` - use Glob\u002FGrep tools instead\n\n## Workflow Guide\n\n### Creating a New Shader\n\n1. **Set up coordinate system** - Choose appropriate UV normalization\n2. **Define core effect** - Implement main visual algorithm\n3. **Add animation** - Use `iTime` for temporal variation\n4. **Apply color palette** - Use cosine palette or custom scheme\n5. **Add post-processing** - Vignette, dither, gamma correction\n6. **Optimize** - Reduce iterations, use early exits, minimize branches\n\n### Common Tasks\n\n**Visualizing complex numbers:**\n- Use the complex math functions in `references\u002Fcommon-patterns.md`\n- Plot with `cx_log()`, `cx_pow()`, or polynomial evaluation\n- Map complex results to color via palette\n\n**Ray marching 3D scenes:**\n- Define distance field in `map()` function\n- Set up camera (ray origin `ro`, ray direction `rd`)\n- March using standard loop pattern\n- Calculate normals with tetrahedron method\n- Apply lighting and material properties\n\n**Creating noise\u002Forganic effects:**\n- Use `hash21()` for random values\n- Implement `fbm()` (fractional Brownian motion) for natural variation\n- Combine with `sin()`\u002F`cos()` for structured patterns\n- Apply domain warping for organic distortion\n\n**Multi-layer composition:**\n- Render multiple passes with different parameters\n- Blend layers using `mix()` or custom blend modes\n- Add interference patterns by comparing layer differences\n- Use `smoothstep()` for soft transitions\n\n### Debugging Strategies\n\n**Visualize intermediate values:**\n```glsl\nfragColor = vec4(vec3(distanceField), 1.0);  \u002F\u002F Show distance\nfragColor = vec4(normal * 0.5 + 0.5, 1.0);   \u002F\u002F Show normals\nfragColor = vec4(fract(uv), 0.0, 1.0);       \u002F\u002F Show UV tiling\n```\n\n**Simplify progressively:**\n- Comment out post-processing\n- Reduce iteration counts\n- Replace complex functions with simple placeholders\n- Check coordinate transformations step-by-step\n\n**Check for NaN\u002FInf:**\n- Add guards: `if (isnan(value) || isinf(value)) return vec3(1.0, 0.0, 0.0);`\n- Validate divisions and roots\n\n## Performance Optimization\n\n1. **Fixed iteration counts** - Avoid dynamic loops\n2. **Early exit conditions** - Break when threshold met\n3. **Step multiplier tuning** - Balance quality vs speed (0.5 to 1.0)\n4. **Minimize texture reads** - Cache repeated lookups\n5. **Avoid conditionals** - Use `mix()`, `step()`, `smoothstep()` instead of `if`\n6. **Reduce precision** - Use `mediump` or `lowp` where appropriate (mobile)\n\n## Naming Conventions\n\nBased on observed patterns in creative work:\n\n- **Poetic\u002Fevocative names** - \"alien-water\", \"heavenly-wisp\", \"comprehension\"\n- **Technical descriptors** - \"complex-plot\", \"noise-circuits\", \"ray-marching-demo\"\n- **Compound phrases** - \"coming-apart-at-the-seams\", \"form-without-form\"\n- **Lowercase with hyphens** - `my-shader-name.glsl`\n\n## Attribution and Forking\n\nWhen forking or remixing shaders:\n\n```glsl\n\u002F\u002F Fork of \"Original Name\" by AuthorName. https:\u002F\u002Fshadertoy.com\u002Fview\u002FXxXxXx\n\u002F\u002F Date: YYYY-MM-DD\n\u002F\u002F License: Creative Commons (CC BY-NC-SA 4.0) [or other]\n```\n\n## Resources\n\n### references\u002Fglsl-reference.md\nComplete GLSL ES syntax reference including:\n- Built-in functions (trig, math, vectors, matrices, textures)\n- Shadertoy input variables specification\n- Type conversions and swizzling\n- Common pitfalls and corrections\n\nSearch with: `Read \u002Freferences\u002Fglsl-reference.md` for complete language reference.\n\n### references\u002Fcommon-patterns.md\nComprehensive pattern library including:\n- Complex number mathematics (cx_mul, cx_div, cx_sin, cx_cos, cx_log, cx_pow)\n- Color palette functions (cosine palette, multi-layer palettes)\n- Hash functions (hash21, PCG hash)\n- Ray marching templates (render loop, normal calculation)\n- 3D transformations (rotations, domain folding)\n- Distance fields (sphere, box, octahedron)\n- Noise functions (simplex, FBM)\n- Post-processing (vignette, blur, film grain, gamma)\n- Blend modes (soft light, hard light, vivid light)\n- Multi-pass rendering patterns\n\nSearch with: `Grep \"pattern\" references\u002Fcommon-patterns.md` for specific techniques.\n\n### references\u002Fexample-compact-shader.glsl\nReference implementation showing:\n- Compact, algorithmic shader coding style\n- Efficient ray marching in minimal code\n- Advanced matrix operations and transformations\n- Creative Commons licensed example\n\n## Quick Reference\n\n```glsl\n#define PI 3.1415926535897932384626433832795\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    \u002F\u002F 1. Normalize coordinates\n    vec2 uv = (fragCoord * 2.0 - iResolution.xy) \u002F min(iResolution.x, iResolution.y);\n\n    \u002F\u002F 2. Compute effect\n    float d = length(uv) - 0.5;  \u002F\u002F Circle distance field\n    vec3 col = vec3(smoothstep(0.01, 0.0, d));  \u002F\u002F Sharp edge\n\n    \u002F\u002F 3. Animate with time\n    col *= 0.5 + 0.5 * sin(iTime + uv.xyx * 3.0);\n\n    \u002F\u002F 4. Apply palette\n    col = palette(col.x, vec3(0.5), vec3(0.5), vec3(1.0), vec3(0.0));\n\n    \u002F\u002F 5. Post-process\n    col = pow(col, vec3(0.45));  \u002F\u002F Gamma\n    col *= vignette(fragCoord \u002F iResolution.xy);\n\n    \u002F\u002F 6. Output\n    fragColor = vec4(col, 1.0);\n}\n```\n\n## Common Shader Types in Collection\n\n1. **Mathematical Visualizations** - Complex number plots, function graphs\n2. **Ray Marched 3D** - Distance field rendering, folded geometries\n3. **Procedural Textures** - Noise-based patterns, organic effects\n4. **Multi-Pass Effects** - Temporal feedback, buffer composition\n5. **Particle Systems** - Point-based simulations\n6. **2D Patterns** - Geometric, kaleidoscopic, interference effects\n\n## Tips for Creative Coding\n\n- **Start simple** - Get basic structure working, then iterate\n- **Use time creatively** - `sin(iTime)`, `mod(iTime, period)`, `smoothstep()` transitions\n- **Layer effects** - Combine multiple techniques for richness\n- **Embrace accidents** - Bugs often lead to interesting visuals\n- **Study references** - Learn from existing shaders, understand techniques\n- **Optimize later** - Prioritize visual quality first, then performance\n","# Shadertoy Shader Development\n\n## Overview\n\nShadertoy is a platform for creating and sharing GLSL fragment shaders that run in the browser using WebGL. This skill provides comprehensive guidance for writing shaders including GLSL ES syntax, common patterns, mathematical techniques, and best practices specific to real-time procedural graphics.\n\n## When to Use This Skill\n\nActivate this skill when:\n- Writing or editing `.glsl` shader files\n- Creating procedural graphics, generative art, or visual effects\n- Working with Shadertoy.com projects or WebGL fragment shaders\n- Implementing ray marching, distance fields, or procedural textures\n- Debugging shader code or optimizing shader performance\n- Need GLSL ES syntax reference or Shadertoy input variables\n\n## Core Concepts\n\n### Shader Entry Point\n\nEvery Shadertoy shader implements the `mainImage` function:\n\n```glsl\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord)\n{\n    \u002F\u002F fragCoord: pixel coordinates (0 to iResolution.xy)\n    \u002F\u002F fragColor: output color (RGBA, typically alpha = 1.0)\n\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    fragColor = vec4(uv, 0.0, 1.0);\n}\n```\n\n### Shadertoy Built-in Inputs\n\nAlways available in shaders:\n\n| Type | Name | Description |\n|------|------|-------------|\n| `vec3` | `iResolution` | Viewport resolution (x, y, aspect ratio) |\n| `float` | `iTime` | Current time in seconds (primary animation driver) |\n| `float` | `iTimeDelta` | Time to render one frame |\n| `int` | `iFrame` | Current frame number |\n| `vec4` | `iMouse` | Mouse: xy = current position, zw = click position |\n| `sampler2D` | `iChannel0`-`iChannel3` | Input textures\u002Fbuffers |\n| `vec3` | `iChannelResolution[4]` | Resolution of each input channel |\n| `vec4` | `iDate` | Year, month, day, time in seconds (.xyzw) |\n\n### Coordinate System Setup\n\nStandard patterns for normalizing coordinates:\n\n```glsl\n\u002F\u002F Aspect-corrected UV centered at origin (-1 to 1, aspect-preserved)\nvec2 uv = (fragCoord.xy - 0.5 * iResolution.xy) \u002F min(iResolution.y, iResolution.x);\n\n\u002F\u002F Alternative compact form:\nvec2 uv = (fragCoord * 2.0 - iResolution.xy) \u002F min(iResolution.x, iResolution.y);\n\n\u002F\u002F Simple normalized (0 to 1)\nvec2 uv = fragCoord \u002F iResolution.xy;\n```\n\n## Common Shader Patterns\n\n### 1. Procedural Color Palettes\n\nUse Inigo Quilez's cosine palette for smooth color gradients:\n\n```glsl\nvec3 palette(float t, vec3 a, vec3 b, vec3 c, vec3 d) {\n    return a + b * cos(6.28318 * (c * t + d));\n}\n\n\u002F\u002F Example usage:\nvec3 col = palette(\n    t,\n    vec3(0.5, 0.5, 0.5),    \u002F\u002F base\n    vec3(0.5, 0.5, 0.5),    \u002F\u002F amplitude\n    vec3(1.0, 1.0, 0.5),    \u002F\u002F frequency\n    vec3(0.8, 0.90, 0.30)   \u002F\u002F phase\n);\n```\n\n### 2. Hash Functions (Pseudo-Random)\n\nSimple 2D hash for noise and randomness:\n\n```glsl\nfloat hash21(vec2 p) {\n    p = fract(p * vec2(234.34, 435.345));\n    p += dot(p, p + 34.23);\n    return fract(p.x * p.y);\n}\n```\n\n### 3. Ray Marching\n\nStandard pattern for 3D rendering via sphere tracing:\n\n```glsl\n\u002F\u002F Distance field function\nfloat map(vec3 p) {\n    return length(p) - 1.0;  \u002F\u002F Sphere at origin, radius 1\n}\n\n\u002F\u002F Normal calculation\nvec3 calcNormal(vec3 p) {\n    vec2 e = vec2(0.001, 0.0);\n    return normalize(vec3(\n        map(p + e.xyy) - map(p - e.xyy),\n        map(p + e.yxy) - map(p - e.yxy),\n        map(p + e.yyx) - map(p - e.yyx)\n    ));\n}\n\n\u002F\u002F Ray marching loop\nvec3 render(vec3 ro, vec3 rd) {\n    float t = 0.0;\n    for (int i = 0; i \u003C 100; i++) {\n        vec3 p = ro + rd * t;\n        float d = map(p);\n        if (d \u003C 0.001) {\n            \u002F\u002F Hit - calculate lighting\n            vec3 n = calcNormal(p);\n            return n * 0.5 + 0.5;  \u002F\u002F Normal visualization\n        }\n        if (t > 10.0) break;\n        t += d * 0.5;  \u002F\u002F Step (0.5 factor for safety)\n    }\n    return vec3(0.0);  \u002F\u002F Miss\n}\n```\n\n### 4. Rotations\n\n2D rotation:\n```glsl\nmat2 rot2d(float a) {\n    float c = cos(a), s = sin(a);\n    return mat2(c, -s, s, c);\n}\n\u002F\u002F Usage: p.xy *= rot2d(iTime);\n```\n\n3D axis-angle rotation (modifies in-place):\n```glsl\nvoid rot(inout vec3 p, vec3 axis, float angle) {\n    axis = normalize(axis);\n    float s = sin(angle), c = cos(angle), oc = 1.0 - c;\n    mat3 m = mat3(\n        oc * axis.x * axis.x + c,           oc * axis.x * axis.y - axis.z * s,  oc * axis.z * axis.x + axis.y * s,\n        oc * axis.x * axis.y + axis.z * s,  oc * axis.y * axis.y + c,           oc * axis.y * axis.z - axis.x * s,\n        oc * axis.z * axis.x - axis.y * s,  oc * axis.y * axis.z + axis.x * s,  oc * axis.z * axis.z + c\n    );\n    p = m * p;\n}\n```\n\n### 5. Domain Repetition and Folding\n\nCreate fractal-like structures:\n\n```glsl\nvec3 foldRotate(vec3 p, float timeOffset) {\n    for (int i = 0; i \u003C 5; i++) {\n        p = abs(p);  \u002F\u002F Mirror fold\n        rot(p, vec3(0.707, 0.707, 0.0), 0.785);\n        p -= 0.5;    \u002F\u002F Translate\n    }\n    return p;\n}\n```\n\n### 6. Post-Processing\n\nVignette:\n```glsl\nfloat vignette(vec2 uv) {\n    uv *= 1.0 - uv.yx;\n    return pow(uv.x * uv.y * 15.0, 0.25);\n}\n```\n\nFilm grain\u002Fdithering (reduces banding):\n```glsl\nfloat dither = hash21(fragCoord + iTime) * 0.001;\nfinalCol += dither;\n```\n\nGamma correction:\n```glsl\nfinalCol = pow(finalCol, vec3(0.45));  \u002F\u002F ~1\u002F2.2\n```\n\n## Multi-Pass Rendering\n\nFor complex effects requiring temporal feedback or multiple rendering stages:\n\n### Buffer A (Computation):\n```glsl\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    \u002F\u002F Generate or compute values\n    fragColor = vec4(computedColor, 1.0);\n}\n```\n\n### Buffer B (Feedback\u002FBlending):\n```glsl\n#define BUFFER_A iChannel0\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    vec4 current = texture(BUFFER_A, uv);\n    vec4 previous = texture(iChannel1, uv);  \u002F\u002F Self-reference\n    fragColor = mix(previous, current, 0.1);  \u002F\u002F Temporal blend\n}\n```\n\n### Main (Final Output):\n```glsl\n#define BUFFER_B iChannel1\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = fragCoord \u002F iResolution.xy;\n    fragColor = texture(BUFFER_B, uv);\n}\n```\n\n## Critical GLSL ES Rules\n\n**ALWAYS follow these rules to avoid compilation errors:**\n\n1. **NO `f` suffix**: Use `1.0` NOT `1.0f`\n2. **NO `saturate()`**: Use `clamp(x, 0.0, 1.0)` instead\n3. **Protect pow\u002Fsqrt**: Wrap arguments: `pow(max(x, 0.0), p)`, `sqrt(abs(x))`\n4. **Avoid division by zero**: Check denominators or add epsilon\n5. **Initialize variables**: Don't assume default values\n6. **Avoid name conflicts**: Don't name functions like variables\n7. **NO interactive commands**: Avoid `find`, `grep` - use Glob\u002FGrep tools instead\n\n## Workflow Guide\n\n### Creating a New Shader\n\n1. **Set up coordinate system** - Choose appropriate UV normalization\n2. **Define core effect** - Implement main visual algorithm\n3. **Add animation** - Use `iTime` for temporal variation\n4. **Apply color palette** - Use cosine palette or custom scheme\n5. **Add post-processing** - Vignette, dither, gamma correction\n6. **Optimize** - Reduce iterations, use early exits, minimize branches\n\n### Common Tasks\n\n**Visualizing complex numbers:**\n- Use the complex math functions in `references\u002Fcommon-patterns.md`\n- Plot with `cx_log()`, `cx_pow()`, or polynomial evaluation\n- Map complex results to color via palette\n\n**Ray marching 3D scenes:**\n- Define distance field in `map()` function\n- Set up camera (ray origin `ro`, ray direction `rd`)\n- March using standard loop pattern\n- Calculate normals with tetrahedron method\n- Apply lighting and material properties\n\n**Creating noise\u002Forganic effects:**\n- Use `hash21()` for random values\n- Implement `fbm()` (fractional Brownian motion) for natural variation\n- Combine with `sin()`\u002F`cos()` for structured patterns\n- Apply domain warping for organic distortion\n\n**Multi-layer composition:**\n- Render multiple passes with different parameters\n- Blend layers using `mix()` or custom blend modes\n- Add interference patterns by comparing layer differences\n- Use `smoothstep()` for soft transitions\n\n### Debugging Strategies\n\n**Visualize intermediate values:**\n```glsl\nfragColor = vec4(vec3(distanceField), 1.0);  \u002F\u002F Show distance\nfragColor = vec4(normal * 0.5 + 0.5, 1.0);   \u002F\u002F Show normals\nfragColor = vec4(fract(uv), 0.0, 1.0);       \u002F\u002F Show UV tiling\n```\n\n**Simplify progressively:**\n- Comment out post-processing\n- Reduce iteration counts\n- Replace complex functions with simple placeholders\n- Check coordinate transformations step-by-step\n\n**Check for NaN\u002FInf:**\n- Add guards: `if (isnan(value) || isinf(value)) return vec3(1.0, 0.0, 0.0);`\n- Validate divisions and roots\n\n## Performance Optimization\n\n1. **Fixed iteration counts** - Avoid dynamic loops\n2. **Early exit conditions** - Break when threshold met\n3. **Step multiplier tuning** - Balance quality vs speed (0.5 to 1.0)\n4. **Minimize texture reads** - Cache repeated lookups\n5. **Avoid conditionals** - Use `mix()`, `step()`, `smoothstep()` instead of `if`\n6. **Reduce precision** - Use `mediump` or `lowp` where appropriate (mobile)\n\n## Naming Conventions\n\nBased on observed patterns in creative work:\n\n- **Poetic\u002Fevocative names** - \"alien-water\", \"heavenly-wisp\", \"comprehension\"\n- **Technical descriptors** - \"complex-plot\", \"noise-circuits\", \"ray-marching-demo\"\n- **Compound phrases** - \"coming-apart-at-the-seams\", \"form-without-form\"\n- **Lowercase with hyphens** - `my-shader-name.glsl`\n\n## Attribution and Forking\n\nWhen forking or remixing shaders:\n\n```glsl\n\u002F\u002F Fork of \"Original Name\" by AuthorName. https:\u002F\u002Fshadertoy.com\u002Fview\u002FXxXxXx\n\u002F\u002F Date: YYYY-MM-DD\n\u002F\u002F License: Creative Commons (CC BY-NC-SA 4.0) [or other]\n```\n\n## Resources\n\n### references\u002Fglsl-reference.md\nComplete GLSL ES syntax reference including:\n- Built-in functions (trig, math, vectors, matrices, textures)\n- Shadertoy input variables specification\n- Type conversions and swizzling\n- Common pitfalls and corrections\n\nSearch with: `Read \u002Freferences\u002Fglsl-reference.md` for complete language reference.\n\n### references\u002Fcommon-patterns.md\nComprehensive pattern library including:\n- Complex number mathematics (cx_mul, cx_div, cx_sin, cx_cos, cx_log, cx_pow)\n- Color palette functions (cosine palette, multi-layer palettes)\n- Hash functions (hash21, PCG hash)\n- Ray marching templates (render loop, normal calculation)\n- 3D transformations (rotations, domain folding)\n- Distance fields (sphere, box, octahedron)\n- Noise functions (simplex, FBM)\n- Post-processing (vignette, blur, film grain, gamma)\n- Blend modes (soft light, hard light, vivid light)\n- Multi-pass rendering patterns\n\nSearch with: `Grep \"pattern\" references\u002Fcommon-patterns.md` for specific techniques.\n\n### references\u002Fexample-compact-shader.glsl\nReference implementation showing:\n- Compact, algorithmic shader coding style\n- Efficient ray marching in minimal code\n- Advanced matrix operations and transformations\n- Creative Commons licensed example\n\n## Quick Reference\n\n```glsl\n#define PI 3.1415926535897932384626433832795\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    \u002F\u002F 1. Normalize coordinates\n    vec2 uv = (fragCoord * 2.0 - iResolution.xy) \u002F min(iResolution.x, iResolution.y);\n\n    \u002F\u002F 2. Compute effect\n    float d = length(uv) - 0.5;  \u002F\u002F Circle distance field\n    vec3 col = vec3(smoothstep(0.01, 0.0, d));  \u002F\u002F Sharp edge\n\n    \u002F\u002F 3. Animate with time\n    col *= 0.5 + 0.5 * sin(iTime + uv.xyx * 3.0);\n\n    \u002F\u002F 4. Apply palette\n    col = palette(col.x, vec3(0.5), vec3(0.5), vec3(1.0), vec3(0.0));\n\n    \u002F\u002F 5. Post-process\n    col = pow(col, vec3(0.45));  \u002F\u002F Gamma\n    col *= vignette(fragCoord \u002F iResolution.xy);\n\n    \u002F\u002F 6. Output\n    fragColor = vec4(col, 1.0);\n}\n```\n\n## Common Shader Types in Collection\n\n1. **Mathematical Visualizations** - Complex number plots, function graphs\n2. **Ray Marched 3D** - Distance field rendering, folded geometries\n3. **Procedural Textures** - Noise-based patterns, organic effects\n4. **Multi-Pass Effects** - Temporal feedback, buffer composition\n5. **Particle Systems** - Point-based simulations\n6. **2D Patterns** - Geometric, kaleidoscopic, interference effects\n\n## Tips for Creative Coding\n\n- **Start simple** - Get basic structure working, then iterate\n- **Use time creatively** - `sin(iTime)`, `mod(iTime, period)`, `smoothstep()` transitions\n- **Layer effects** - Combine multiple techniques for richness\n- **Embrace accidents** - Bugs often lead to interesting visuals\n- **Study references** - Learn from existing shaders, understand techniques\n- **Optimize later** - Prioritize visual quality first, then performance\n",{"name":5,"description":7},"main","351d6f0a5dac78be33208c688fdbb820b9053685",".claude\u002Fskills\u002Fshadertoy",0,"https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing","https:\u002F\u002Fgithub.com\u002Fsurfingalien","2026-11-14 00:29:40",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add surfingalien\u002FFinSurfing --skill shadertoy",{"tool":36,"command":37},"bunx","bunx skills add surfingalien\u002FFinSurfing --skill shadertoy",{"tool":39,"command":40},"pnpm","pnpm dlx skills add surfingalien\u002FFinSurfing --skill shadertoy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fshadertoy\u002FSKILL.md",true,[44,50,54],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fcommon-patterns.md","REFERENCE","参考文档",9736,"https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fshadertoy\u002Freferences\u002Fcommon-patterns.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fexample-compact-shader.glsl",649,"https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fshadertoy\u002Freferences\u002Fexample-compact-shader.glsl",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fglsl-reference.md",13432,"https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fshadertoy\u002Freferences\u002Fglsl-reference.md",[59,65,71,78,85,92],{"skillNo":60,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7490VYNX3NCT8R0PPSYHTXP","portfolio-management","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fskills\u002Fportfolio-management\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7490SNSG32QP06X1P1EVK7N","financial-analysis","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fskills\u002Ffinancial-analysis\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7490MKJ5QCVWWXC8HK57EVQ","tradingview-mcp","AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, Reddit sentiment, news, and multi-market screener. Supports stocks, crypto, ETFs, indices, Turkish (BIST), and Egyptian (EGX) markets.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fopenclaw\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7490FHXRPVEPQMZ4KHFD161","sales-engineer","Analyzes RFP\u002FRFI responses for coverage gaps, builds competitive feature comparison matrices, and plans proof-of-concept (POC) engagements for pre-sales engineering. Use when responding to RFPs, bids, or proposal requests; comparing product features against competitors; planning or scoring a customer POC or sales demo; preparing a technical proposal; or performing win\u002Floss competitor analysis. Handles tasks described as 'RFP response', 'bid response', 'proposal response', 'competitor comparison', 'feature matrix', 'POC planning', 'sales demo prep', or 'pre-sales engineering'.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fbusiness-growth\u002Fskills\u002Fsales-engineer\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7490C91D8F7CM7AXFZK8SQE","revenue-operations","Analyzes sales pipeline health, revenue forecasting accuracy, and go-to-market efficiency metrics for SaaS revenue optimization. Use when analyzing sales pipeline coverage, forecasting revenue, evaluating go-to-market performance, reviewing sales metrics, assessing pipeline analysis, tracking forecast accuracy with MAPE, calculating GTM efficiency, or measuring sales efficiency and unit economics for SaaS teams.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fbusiness-growth\u002Fskills\u002Frevenue-operations\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M74907FEV2YRKSYPNG649HGF","customer-success-manager","Monitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success. Use when analyzing customer accounts, reviewing retention metrics, scoring at-risk customers, or when the user mentions churn, customer health scores, upsell opportunities, expansion revenue, retention analysis, or customer analytics. Runs three Python CLI tools to produce deterministic health scores, churn risk tiers, and prioritized expansion recommendations across Enterprise, Mid-Market, and SMB segments.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fbusiness-growth\u002Fskills\u002Fcustomer-success-manager\u002FSKILL.md",[],[]]