Skip to content
Back to search

shader-skills

MarketplaceWorks with Claude CodeGitHub

GLSL and Shadertoy shader skills for AI coding agents

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/gokayfem/shader-skills with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/gokayfem/shader-skills'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/gokayfem--shader-skills/badge.svg)](/listings/gokayfem--shader-skills)

HTML

<a href="/listings/gokayfem--shader-skills"><img src="/api/listings/gokayfem--shader-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**Claude Code** (plugin marketplace):

claude plugin marketplace add gokayfem/shader-skills
claude plugin install shader-skills@shader-skills

For a manual Claude Code installation, copy `skills/shader-art-coding` into `~/.claude/skills/` after cloning the repository (see below).

**Codex, Cursor, Gemini CLI, GitHub Copilot and other supported agents** (via [skills](https://github.com/vercel-labs/skills)):

npx skills add gokayfem/shader-skills

The installer requires Node.js 22.20 or later and installs into the current project by default; add `-g` for a global installation. See the [skills CLI documentation](https://github.com/vercel-labs/skills) for supported agents.

**Manual installation:** clone the repository first, then copy the skill into your agent's skill directory.

git clone https://github.com/gokayfem/shader-skills.git
cd shader-skills

- **Codex:** copy `skills/shader-art-coding` to `~/.agents/skills/`. - **Cursor:** copy it to `~/.cursor/skills/`, plus the rule in `adapters/cursor/`. - **Copilot:** `gh skill install gokayfem/shader-skills shader-art-coding`, plus `adapters/copilot/`. - **Gemini CLI:** `gemini extensions install https://github.com/gokayfem/shader-skills`. - **Hermes:** copy it to `~/.hermes/skills/`.

**claude.ai:** download `shader-art-coding-v2.0.0.zip` from the [v2.0.0 release](https://github.com/gokayfem/shader-skills/releases/tag/v2.0.0) and upload it under Settings > Capabilities > Skills. The ZIP also works as a portable skill folder for manual installation.

**ChatGPT, Gemini Gems and other chat tools:** see [`adapters/`](adapters/).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 25 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "shader-skills",
  3. "description": "GLSL and Shadertoy shader skills for AI coding agents",
  4. "owner": {
  5. "name": "gokayfem",
  6. "url": "https://github.com/gokayfem"
  7. },
  8. "plugins": [
  9. {
  10. "name": "shader-skills",
  11. "source": "./",
  12. "description": "Create and debug procedural GLSL shaders with a tested library, SDF raymarching, terrain, water, clouds and ready-to-run Shadertoy examples.",
  13. "category": "development",
  14. "tags": [
  15. "agent-skills",
  16. "glsl",
  17. "shadertoy",
  18. "webgl2",
  19. "raymarching",
  20. "procedural-generation",
  21. "generative-art"
  22. ]
  23. }
  24. ]
  25. }
README.md · README · 289 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Shader Skills — GLSL & Shadertoy for AI coding agents
  2. [![Checks](https://github.com/gokayfem/shader-skills/actions/workflows/checks.yml/badge.svg)](https://github.com/gokayfem/shader-skills/actions/workflows/checks.yml)
  3. [![Release](https://img.shields.io/github/v/release/gokayfem/shader-skills)](https://github.com/gokayfem/shader-skills/releases/latest)
  4. [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
  5. 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. The skill includes **196 GLSL functions across 21 modules**, a dependency bundler and a checker. It works with Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI.
  6. The full repository includes **25 interactive shader studies** and **two WebGPU worlds**. Use the studies to isolate an effect, then explore how a swimmable kelp forest or a streamed landscape handles visibility, lighting and frame time. [Offline shader viewer](gallery/studies.html) · [WebGPU worlds](worlds/README.md) · [Performance guide](skills/shader-art-coding/references/frame-budgets.md)
  7. ```bash
  8. npx skills add gokayfem/shader-skills
  9. ```
  10. Choose `shader-art-coding` and your coding agent in the installer. Then ask:
  11. > Create a Shadertoy shader of an alpine valley with snow, a winding river and atmospheric depth.
  12. > Use the shader-art-coding skill, bundle the result into one file, and check it.
  13. [Install options](#install) · [Shader gallery](#shader-gallery) · [Usage](#use) ·
  14. [GLSL library](skills/shader-art-coding/references/library-index.md) ·
  15. [Video-to-shader prompt](prompts/video-to-shader-prompt.md) ·
  16. [Releases](https://github.com/gokayfem/shader-skills/releases) · [Contributing](CONTRIBUTING.md)
  17. ## Explore the shader studies
  18. [![Four live shader studies in motion](gallery/studies-motion.webp)](gallery/studies.html)
  19. Open [the self-contained shader viewer](gallery/studies.html) from a local checkout, or download the HTML using GitHub’s **Download raw file** button. It runs offline in a WebGL2 browser. Explore 22 single-pass shaders and three multipass examples. Pause motion, inspect diagnostic views, or switch between fixed resolution and adaptive 30 or 60 fps targets.
  20. | [![Morpho wing study](gallery/morpho.png)](gallery/morpho.glsl) | [![Comb jelly under side light](gallery/comb-jelly.png)](gallery/comb-jelly.glsl) | [![Lensed accretion disk](gallery/lensed-disk.png)](gallery/lensed-disk.glsl) |
  21. |---|---|---|
  22. | **Morpho.** Change the optical period or watch the left and right wings flash as they tilt. | **Comb jelly.** Follow the light along eight rows of beating plates. Turn off the side light to isolate the transparent body. | **Accretion disk.** Lower the camera toward the disk and watch its far side arc over the shadow. Toggle light-path caching. |
  23. | [![Flow engraving](gallery/streamline-press.png)](gallery/streamline-press.glsl) | [![Reaction-diffusion print at step 400](gallery/reaction-diffusion.png)](gallery/reaction-diffusion) | [![Alpine valley](gallery/alpine-valley.png)](gallery/alpine-cache) |
  24. | **Streamline press.** Paper grain follows a vector field around a vermilion cylinder. Change its radius to move the stagnation points. | **Reaction–diffusion.** Drag to seed a two-channel feedback simulation. Change the feed and removal rates to grow a different pattern. | **Cached alpine valley.** Move the camera over a retained elevation texture. [Three-camera comparison](gallery/alpine-cache/benchmark.md) |
  25. The [research studies guide](skills/shader-art-coding/references/research-studies.md) links the original papers, explains the approximations and gives a second shot to try for each technique.
  26. ## Dive, landscape and lighting studies
  27. | [![Kelp passage](gallery/kelp-passage.png)](gallery/kelp-passage.glsl) | [![Sponge shelf](gallery/sponge-shelf.png)](gallery/sponge-shelf.glsl) | [![Wreck ribs](gallery/ribbed-wreck.png)](gallery/ribbed-wreck.glsl) |
  28. |---|---|---|
  29. | Kelp passage · current and sun shafts | Sponge shelf · cavities and fluorescence | Ribbed wreck · orbit and dive depth |
  30. | [![Coastal observatory](gallery/tide-observatory.png)](gallery/tide-observatory.glsl) | [![Layered forest](gallery/cloudline-forest.png)](gallery/cloudline-forest.glsl) | [![Pigment chamber](gallery/pigment-chamber.png)](gallery/pigment-chamber.glsl) |
  31. | Tide observatory · hour, clouds, moon phase | Cloudline forest · wind and projected detail | Pigment chamber · lamp position and wall bounce |
  32. Compare the chamber to its [80-patch feedback solver](gallery/room-radiosity) in the [offline viewer](gallery/studies.html). The [world rendering guide](skills/shader-art-coding/references/world-rendering.md) gives a diagnostic experiment for each scene.
  33. The full checkout also contains a [swimmable WebGPU dive](worlds/dive/index.html) and a Rust/WebGPU landscape renderer with a browser editor. Open the [worlds guide](worlds/README.md) for launch instructions and subsystem walkthroughs, or [browse all 541 source files and assets](worlds/catalog.md).
  34. ## Measure rendering performance
  35. Where you spend pixels matters. On an Apple M4 in Chrome, reducing the fixed cloud study from 800 × 450 to 480 × 270 cut median image-pass time from **15.00 to 5.55 ms**. The same change saved **0.70 ms** on the wreck. Each figure includes a one-pixel readback and comes from 60 samples per size. [Benchmark method and p95 results](skills/shader-art-coding/references/frame-budgets.md#reproduce-the-gallery-resolution-experiment)
  36. The worlds show how those decisions look in a complete renderer. Trace half-resolution light shafts and distance-based kelp geometry in the dive, or follow cluster rejection and coarse-first streaming in the landscape. [Rendering techniques](skills/shader-art-coding/references/frame-budgets.md) · [Frame pacing at six dive viewpoints](worlds/README.md#desktop-dive-timing)
  37. ## Shader gallery
  38. | | | |
  39. |---|---|---|
  40. | [![Studio still life](gallery/raymarch-sdf.png)](gallery/raymarch-sdf.glsl) | [![Eroded mountains](gallery/terrain.png)](gallery/terrain.glsl) | [![Cumulus clouds](gallery/volumetric-clouds.png)](gallery/volumetric-clouds.glsl) |
  41. | SDF still life: smooth blends with blended materials, PBR, soft shadows, AO, AgX | Eroded terrain under a physically based sky with aerial perspective | Volumetric cumulus: energy-conserving integration, Beer-Powder, dual-lobe phase |
  42. | [![Dusk poster](gallery/sdf-2d-poster.png)](gallery/sdf-2d-poster.glsl) | [![Pattern swatches](gallery/pattern-swatches.png)](gallery/pattern-swatches.glsl) | [![Open ocean](gallery/ocean.png)](gallery/ocean.glsl) |
  43. | 2D distance-field poster: Oklab gradients, polar leaves, Bézier trunks | Texture-free materials: warped marble, Voronoi cracks, hex tiles, Truchet, filtered checker | Ocean: dispersive waves with analytic curvature foam, Fresnel sky, glitter path widening with distance |
  44. [![Backlit agate with quartz facets and iron-rich growth bands](gallery/banded-agate.png)](gallery/banded-agate.glsl)
  45. The agate shader combines filtered mineral bands with a faceted quartz pocket. Adjust `BAND_COUNT` to change the
  46. spacing and `BACKLIGHT` to bring out the translucent center. The Voronoi crystal calculation runs inside the pocket.
  47. Each image links to its paste-ready shader. The sources are in [`skills/shader-art-coding/templates/`](skills/shader-art-coding/templates/).
  48. ## Why
  49. Coding agents can misremember formulas or skip visual checks, and WebGL rejects code that desktop GLSL accepts.
  50. Common results are struct ternaries, sine hashes that differ per GPU, SDFs with wrong signs,
  51. double gamma, and fog that ignores the sky. This skill closes those gaps:
  52. - **Tested building blocks instead of recalled ones.** Every SDF is checked on the GPU:
  53. - the Lipschitz bound (safe to raymarch);
  54. - exactness, by projecting points onto the surface;
  55. - inside/outside signs;
  56. - for curves, agreement with brute-force distance.
  57. Noise derivatives are checked against finite differences, curl noise for zero divergence, color transforms for
  58. round trips, and intersectors against their SDFs.
  59. - **A bundler,** so the agent writes `sdRoundCone(...)`, `softShadow(...)`, `tonemapAgX(...)` by name and ships one
  60. self-contained file.
  61. - **A checker** that catches WebGL1 leftovers, sine hashes, `#version` lines and missing `mainImage`, and compiles
  62. with glslangValidator.
  63. - **A workflow** with a fixed debug-mode convention, so problems are inspected as fields rather than guessed at.
  64. - **Routing** from subjects ("a jellyfish", "snowy mountains") to techniques, templates and formulas.
  65. ## Install
  66. **Claude Code** (plugin marketplace):
  67. ```bash
  68. claude plugin marketplace add gokayfem/shader-skills
  69. ```
  70. ```bash
  71. claude plugin install shader-skills@shader-skills
  72. ```
  73. For a manual Claude Code installation, copy `skills/shader-art-coding` into `~/.claude/skills/` after cloning the repository (see below).
  74. **Codex, Cursor, Gemini CLI, GitHub Copilot and other supported agents** (via [skills](https://github.com/vercel-labs/skills)):
  75. ```bash
  76. npx skills add gokayfem/shader-skills
  77. ```
  78. The installer requires Node.js 22.20 or later and installs into the current project by default; add `-g` for a
  79. global installation. See the [skills CLI documentation](https://github.com/vercel-labs/skills) for supported agents.
  80. **Manual installation:** clone the repository first, then copy the skill into your agent's skill directory.
  81. ```bash
  82. git clone https://github.com/gokayfem/shader-skills.git
  83. cd shader-skills
  84. ```
  85. - **Codex:** copy `skills/shader-art-coding` to `~/.agents/skills/`.
  86. - **Cursor:** copy it to `~/.cursor/skills/`, plus the rule in `adapters/cursor/`.
  87. - **Copilot:** `gh skill install gokayfem/shader-skills shader-art-coding`, plus `adapters/copilot/`.
  88. - **Gemini CLI:** `gemini extensions install https://github.com/gokayfem/shader-skills`.
  89. - **Hermes:** copy it to `~/.hermes/skills/`.
  90. **claude.ai:** download `shader-art-coding-v2.0.0.zip` from the [v2.0.0 release](https://github.com/gokayfem/shader-skills/releases/tag/v2.0.0) and upload it under Settings > Capabilities > Skills. The ZIP also works as a portable skill folder for manual installation.
  91. **ChatGPT, Gemini Gems and other chat tools:** see [`adapters/`](adapters/).
  92. ## Use
  93. Ask naturally: *"Make a Shadertoy shader of a glass jellyfish drifting through god rays"*, or *"why does my
  94. raymarcher have holes?"* The skill routes the request, then the agent finds blocks, writes the shader, bundles it
  95. and checks it. From a cloned repository, try the included still-life template:
  96. ```bash
  97. python3 skills/shader-art-coding/scripts/glsl_tools.py search petal leaf
  98. python3 skills/shader-art-coding/scripts/glsl_tools.py bundle skills/shader-art-coding/templates/raymarch-sdf.glsl -o /tmp/shader-skills-example.glsl
  99. python3 skills/shader-art-coding/scripts/glsl_tools.py check /tmp/shader-skills-example.glsl
  100. ```
  101. What the commands do:
  102. - `search` ranks functions by name, summary and `@use` tags.
  103. - `bundle` resolves dependencies transitively and emits them in declaration order.
  104. - `check` lints the file and compiles it when `glslangValidator` is installed (`brew install glslang` or
  105. `apt install glslang-tools`).
  106. The command-line tools need Python 3 and use only its standard library. Generated shaders target
  107. **Shadertoy / WebGL2 / GLSL ES 3.00**; HLSL and Unity ShaderLab are outside this skill's scope.
  108. For an existing video reference, start with the [video-to-shader prompt](prompts/video-to-shader-prompt.md),
  109. which guides scene analysis, procedural reconstruction and visual comparison against the clip.
  110. ## What's in the library
  111. | Module | Highlights |
  112. |---|---|
  113. | `hash` | PCG integer hashes (`pcg3d`, `pcg4d`): bit-exact across GPUs, no sine; safe integer-input float wrappers |
  114. | `noise` | value, gradient and 2D simplex noise with analytic derivatives, fBm, eroded/ridged/billow fBm, two-level domain warp, hybrid terrain height, curl noise, Voronoi (F1/F2, borders, smooth), interleaved-gradient and R2 dithering |
  115. | `pattern` | box-filtered checker, grid and stripes (alias-free with no supersampling), hex grid with edge distance, Truchet |
  116. | `sdf3d` | 22 primitives including exact capped cone, round cone, cut and hollow spheres, death star, hex prism, link, gyroid, 3D Bézier tube |
  117. | `sdf2d` | 16 primitives including vesica, moon, heart, star, regular polygon, rounded box with per-corner radii, quadratic Bézier |
  118. | `operators` | smooth min/max/subtract (quadratic and C2 cubic), smooth union with material blend weight, chamfer, stairs, engrave, round, onion, extrude, revolve, exact elongate |
  119. | `domain` | repetition (infinite, limited, mirrored), polar sectors, folds, twist and bend with their Lipschitz corrections |
  120. | `architecture` | stable parcel-based building dimensions/roof IDs, box-filtered facade windows that converge to opening area |
  121. | `raymarch` | sphere tracing with distance-relative hit threshold, tetrahedral normals, improved soft shadows, AO, thickness; WebGL-safe loops |
  122. | `shading` | GGX + height-correlated Smith + Schlick, metallic-roughness `shadePBR`, environment BRDF approximation, wrap diffuse, translucency, rim |
  123. | `water` | finite-depth dispersion, analytic wave height/slope/curvature, exact dielectric Fresnel including TIR, RGB Beer-Lambert attenuation |
  124. | `color` / `tonemap` | exact sRGB curves, Oklab / OkLCh mixing, blackbody colors; AgX (default), AgX punchy, Khronos PBR Neutral, ACES fitted, Reinhard |
  125. | `volume` / `atmosphere` | HG, dual-lobe, Rayleigh and Cornette-Shanks phase, energy-conserving `volumeStep`, Beer-Powder, analytic height fog; physically based single-scattering sky, sun disk with limb darkening |
  126. | `camera` / `intersect` / `post` / `debug` | look-at, thin-lens DOF, ortho; analytic sphere/box/plane hits; AA helpers, R2 supersampling offsets, cos⁴ vignette, grain, TPDF dither; distance, normal, id and heat debug views |
  127. The full catalog with signatures, exactness and uses is
  128. [`references/library-index.md`](skills/shader-art-coding/references/library-index.md).
  129. ## Noise: from a first field to a game use case
  130. The [noise learning guide](skills/shader-art-coding/references/noise-use-cases.md) covers all ten entries in the
  131. Noise Learning Progression reference: what each means, where its code lives, when to use it, tuning, and links to
  132. author-maintained external implementations. It includes eleven compile-checked recipes and two complete shaders.
  133. | Technique | Call the library | Use it for |
  134. |---|---|---|
  135. | Perlin-style gradient | `gradientNoise`, `gradientNoiseD` | Broad hills, weather masks, surface normals |
  136. | Voronoi | `voronoiBorder`, `smoothVoronoi` | Rock plates, constant-width cracks, cell walls |
  137. | Simplex | `simplexNoise`, `simplexNoiseD` | Ripples, rotating-gradient flow, churning lava |
  138. | Fractal / fBm | `fbm`, `erodedFbm` | Multiscale terrain, clouds, slope-damped detail |
  139. | Domain warp | `warpedFbm` | Marble, agate, distorted terrain and cloud bands |
  140. | Value | `valueNoise`, `valueNoiseD` | Cheap smooth masks; quantize inputs for retro blocks |
  141. | Cellular / Worley | `voronoi` F1/F2 and cell IDs | Biome regions, foam, per-stone variation |
  142. | Ridged | `ridgedFbm` | Mountain crests, canyons, rocky veins |
  143. | Billow | `billowFbm` | Puffy smoke, cumulus lobes, rounded terrain |
  144. | Hybrid | `hybridTerrainHeight` | Bounded heightmaps combining warped hills, ridges and cells |
  145. These functions are in [`noise.glsl`](skills/shader-art-coding/glsl/noise.glsl). Voronoi and Worley refer to the
  146. same cellular family here; fBm and domain warping compose base fields. Simplex performance depends on implementation
  147. and target hardware. The guide distinguishes smooth value noise from blocky hashes and designed river masks from
  148. hydrological simulation.
  149. | [![Ten noise studies](gallery/noise-progression.png)](gallery/noise-progression.glsl) | [![Hybrid terrain and river relief map](gallery/noise-terrain-map.png)](gallery/noise-terrain-map.glsl) |
  150. |---|---|
  151. | Top: gradient, Voronoi borders, simplex, fBm, marble warp. Bottom: smooth value, F2−F1 cellular, ridged, billow, hybrid. | Putting it together: warped hills, ridged mountains, cellular breakup, slope-based materials and a designed river channel. |
  152. Click a preview for the standalone Shadertoy shader. Editable sources:
  153. [`noise-progression.glsl`](skills/shader-art-coding/templates/noise-progression.glsl) and
  154. [`noise-terrain-map.glsl`](skills/shader-art-coding/templates/noise-terrain-map.glsl).
  155. ## Procedural buildings, terrain and water
  156. Three complete, texture-free starting points cover construction, landscape and shallow-water optics. Each has
  157. art controls, inspectable debug modes, a standalone Shadertoy bundle and a rendered preview.
  158. | [![Procedural city](gallery/procedural-city.png)](gallery/procedural-city.glsl) | [![Alpine valley](gallery/alpine-valley.png)](gallery/alpine-valley.glsl) | [![Refractive coastal water](gallery/coastal-water.png)](gallery/coastal-water.glsl) |
  159. |---|---|---|
  160. | Parcel-based masses, podiums/setbacks, varied roofs, filtered occupied windows, AO, shadows and height fog. | Designed valley, eroded/ridged terrain, snow by slope/altitude, rock strata, grass and atmospheric depth. | Analytic waves, refracted seabed, reflected land, exact Fresnel, RGB depth absorption, shore foam and three quality presets. |
  161. - **[Procedural buildings](skills/shader-art-coding/references/procedural-buildings.md):** massing hierarchy,
  162. deterministic parcels, neighbor-safe repetition, facade filtering, geometry versus material detail, and mesh/engine integration.
  163. - **[Terrain production](skills/shader-art-coding/references/terrain-production.md):** heightfields versus density,
  164. silhouette/detail separation, primary-trace refinement, biome masks, chunk coordinates, seams and LOD.
  165. - **[Water quality](skills/shader-art-coding/references/water-quality.md):** shallow coast versus open ocean,
  166. reflection/refraction paths, finite-depth waves, filtering, quality presets, and the extra renderer/simulation
  167. systems needed for film or production water. The existing [open-ocean shader](gallery/ocean.glsl) remains available.
  168. The coastal example uses `QUALITY` 1/2/3 for sky reflection, reflected-land rays, and a four-sample still preset
  169. with more waves/steps. It is a single-pass visual study: foam, in-scattering and caustics include artistic
  170. approximations; it does not simulate breaking surf or FFT ocean spectra. The guides identify implemented features
  171. and limits rather than promising a universal “highest quality” or frame rate.
  172. Sources are in [`templates/`](skills/shader-art-coding/templates/). Bundle with `glsl_tools.py bundle` as above.
  173. All three water presets and every annotated diagnostic view are compiled and rendered by the harness.
  174. ## Verification
  175. | Check | Where | What it proves |
  176. |---|---|---|
  177. | Lint + drift | `glsl_tools.py check` | docs and tags on every function, module order, no WebGL1 or sine-hash patterns, reference snippets identical to the library |
  178. | glslang compile | CI (`checks.yml`) | every library module, reference snippet and template compiles as GLSL ES 3.00 |
  179. | WebGL2 compile | `tests/` harness | all library/reference/template units and annotated quality/debug variants compile under ANGLE, which also enforces WebGL-only rules |
  180. | GPU property tests | `tests/properties.py` | 100 tests × 16,384 samples: Lipschitz, exactness, signs, brute-force curve distance, derivatives, divergence, ranges, round trips, facade filtering, water dispersion/Fresnel/attenuation |
  181. | Renders | harness + gallery | 22 beauty templates plus 28 quality/debug variants; no NaNs or black frames; beauty PNGs saved to `gallery/` |
  182. | Bundler regressions | `tests/test_bundler.py` | conditional quality macros cannot hide dependencies; annotated variants replace the intended define and reject missing defines |
  183. | Skill effect | `evals/` (`claude plugin eval`, paid, manual) | output-rule adherence with the skill vs without it on 6 shader tasks, plus no false triggers on 3 near-miss tasks; see [evals/README.md](evals/README.md) |
  184. Run it locally: `python3 tests/build_harness.py && python3 tests/serve.py`, then open
  185. `http://127.0.0.1:8765/build/harness.html`. Headless: `python3 tests/run_webgl.py` (needs Playwright).
  186. To measure a shader change, run `python3 tests/run_webgl.py --benchmark --size 320x180` on both revisions with
  187. the same browser, renderer and resolution. Each beauty shader gets one warm-up draw and seven timed draws at
  188. the same animation time. The JSON records all seven samples and their median in milliseconds, including pixel readback.
  189. ## Conventions
  190. - `#define DEBUG_MODE 0`: 0 final, 1 distance field, 2 normals, 3 ids, 4 steps, 5 masks, 6 lighting terms.
  191. - Scene contract `vec2 map(vec3 p)` returns `vec2(distance, materialId)`.
  192. - Color pipeline:
  193. 1. Light in linear color.
  194. 2. Apply exposure.
  195. 3. Tonemap each AA sample.
  196. 4. Average the samples.
  197. 5. Encode once with `linearToSrgb`.
  198. 6. Dither.
  199. ## Repository
  200. ```text
  201. skills/shader-art-coding/ the skill: SKILL.md, glsl/ library, templates/, references/, scripts/glsl_tools.py
  202. tests/ WebGL2 harness, GPU property tests, gallery builder, headless runner
  203. evals/ plugin eval suite: with vs without the skill
  204. gallery/ offline viewer, rendered previews and paste-ready shader bundles
  205. worlds/ WebGPU dive, landscape engine, launch instructions and source catalog
  206. adapters/ prompts for tools without skill support
  207. .claude-plugin/ Claude Code plugin + marketplace manifests
  208. ```
  209. See [CONTRIBUTING.md](CONTRIBUTING.md) to report a bug, suggest a shader technique or contribute a fix.
  210. [AGENTS.md](AGENTS.md) defines the checks every library change must pass.
  211. Release history and downloads are in the [changelog](CHANGELOG.md) and
  212. [GitHub Releases](https://github.com/gokayfem/shader-skills/releases).
  213. ## Credits and license
  214. MIT. The GLSL library contains original implementations of published techniques. The two WebGPU worlds retain their own MIT notices. Library sources are listed in
  215. [CREDITS.md](CREDITS.md): Inigo Quilez's articles, hg_sdf, Jarzynski & Olano's GPU hash study, Hillaire's
  216. atmosphere and volume work, AgX, Khronos PBR Neutral, Oklab and others.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.