orval
Generate type-safe API clients, TanStack Query/SWR hooks, Zod schemas, MSW mocks, Hono server handlers, MCP servers, and…
Writes, debugs, and art-directs procedural GLSL fragment shaders (Shadertoy mainImage, WebGL2 / GLSL ES 3.00): SDF raymarching, procedural buildings/cities, 2D distance-field graphics, noise / fBm / domain warping, terrain, ocean/coastal water optics, clouds and other volumes,
Claude Code
$ npx -y skills add gokayfem/shader-skills --skill shader-art-coding --agent claude-code
Codex
$ npx skills add gokayfem/shader-skills --skill shader-art-coding -a codex -y
Cursor
$ npx skills add gokayfem/shader-skills --skill shader-art-coding -a cursor -y
Gemini CLI
$ npx skills add gokayfem/shader-skills --skill shader-art-coding -a gemini-cli -y
GitHub Copilot
$ npx skills add gokayfem/shader-skills --skill shader-art-coding -a github-copilot -y
OpenCode
$ npx skills add gokayfem/shader-skills --skill shader-art-coding -a opencode -y
Windsurf
$ npx skills add gokayfem/shader-skills --skill shader-art-coding -a windsurf -y
name: shader-art-coding
description: >-
Writes, debugs, and art-directs procedural GLSL fragment shaders (Shadertoy mainImage, WebGL2 / GLSL ES 3.00):
SDF raymarching, procedural buildings/cities, 2D distance-field graphics, noise / fBm / domain warping, terrain,
ocean/coastal water optics, clouds and other volumes, structural color, black hole lensing, vector-field engraving, feedback simulations, PBR lighting, color and tonemapping. Ships a verified GLSL building-block library with a bundler and
checker. Use when the user asks for a shader, Shadertoy, GLSL/.frag/.glsl code, a raymarcher, an SDF scene, a
procedural texture or generative visual, or wants a shader fixed, optimized, ported or explained. Not for
HLSL/Unity ShaderLab or non-graphics GPU compute.
license: MIT
metadata:
hermes:
tags:
- shader
- glsl
- shadertoy
- procedural-art
- raymarching
- sdf
category: developmentTreat shader work as visual engineering: start from the intended image, choose the smallest mathematical model that can produce it, build it in inspectable stages, and verify each stage with a debug view.
1. **Target.** State the image: subject, camera and framing, dominant forms, materials, light, motion. 2. **Route.** Consult [the example guide](references/example-selection.md) for working sources and visual checks. Pick the rendering model and starting template from `references/subject-routing.md`: 2D distance fields (posters, icons, patterns), SDF raymarching (objects, characters), heightfield marching (landscapes), volume integration (clouds, smoke, fire). For optical mechanisms, orbital light paths, vector-field prints or evolving patterns, use `references/research-studies.md` to select the representation and a visible test of its behavior. 3. **Assemble from the library.** Find building blocks with `python3 scripts/glsl_tools.py search <words>` or `references/library-index.md`, and call them by name. Do not paste or re-derive library code; it is tested. Run `python3 scripts/glsl_tools.py examples <exactName>` to locate direct calls and debug views. Use `rg -n -w <symbol>` within the relevant world directory for host-side callers. 4. **First image fast.** Coordinates, background, one primitive, one light. Then add the debug views. 5. **Refine in order:** proportions, composition, material separation, lighting, atmosphere, color, antialiasing, performance. 6. **Bundle and check.** `python3 scripts/glsl_tools.py bundle shader.glsl -o out.glsl` inlines exactly the functions used. `python3 scripts/glsl_tools.py check out.glsl` lints it and compiles it with glslangValidator when installed. Fix every error, then deliver `out.glsl`.
Run the scripts from this skill's directory. They need only Python 3.
`2.0 / iResolution.y`.
`softShadow`, `calcAO` and `sdfThickness` all use it.
6 lighting terms.
tonemap (`tonemapAgX` by default, per AA sample), then the average, then `linearToSrgb` once, then `ditherTPDF`.
divide the distance or lower the `stepScale` of `raymarch`.
when porting with "keep the look": the sine hash's exact pattern already differs between GPUs, and a PCG hash on the same integer cell ids gives the noise the same look. `check` reports a sine hash as an error.
Read only what the task needs:
| File | Read when | |---|---| | `references/subject-routing.md` | starting from a subject ("a jellyfish", "mountains"); maps formal names to subjects | | `references/library-index.md` | choosing functions: every library function with signature, exactness and uses | | `references/sdf-library-guide.md` | modeling: exactness tiers, blends, neighbor-checked repetition, deformation limits, WebGL pitfalls | | `references/rendering-pipeline.md` | lighting rigs, shadows/AO, sky and fog, volumes, tonemapping, AA, performance | | `references/noise-use-cases.md` | choosing Perlin/value/simplex/cellular noise, fBm/ridged/billow/warp/hybrid recipes, game use cases and primary-source code links | | `references/procedural-buildings.md` | parcel IDs, building massing, setbacks/roofs, facade filtering, city repetition and game integration | | `references/terrain-production.md` | terrain representations, designed valleys, slope/altitude materials, tracing limits, chunks and LOD | | `references/research-studies.md` | optics, null geodesics, streamline engraving, reaction-diffusion, terrain caching and offline playback | | `references/frame-budgets.md` | diagnosing low FPS, GPU timing, foliage culling, half-resolution shafts, cache invalidation, streaming budgets and adaptive resolution | | `references/vegetation-habitats.md` | placing tree groves, wet-bank species and understory from shared fields | | `references/world-rendering.md` | kelp forests, sponges, shipwrecks, tides, foliage deta
Shader Skills helps coding agents write, debug and optimize procedural GLSL for Shadertoy and WebGL2. Start with an editable scene, change the lighting or geometry, and bundle it into a single shader.
Generate type-safe API clients, TanStack Query/SWR hooks, Zod schemas, MSW mocks, Hono server handlers, MCP servers, and…
Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance…
Use this skill when the user is building against Anthropic APIs or SDKs, including `@anthropic-ai/sdk`, `anthropic`, or Agent SDK…
Writing or converting formatted output in ripwire's C++ source — std::print/std::format via rw::emitTo, emitRaw and formatTo,…