Skip to content
Skills Library
Design & UX · Building & coding

shaders

/shaders

Use when editing, adding, or reviewing a WebGL shader mode in src/components/DitherBackground.tsx (the notebook backdrop, one GLSL program with 20 theme-driven modes) or src/components/settings/TileShader.tsx (Activity tile washes), or when a theme in src/lib/themes.ts gets a new `shader` variant. Renders the real GLSL in a browser harness so the change is seen before it ships.

Repository
alchemy ↗
Licence
MPL-2.0
Last repository change
11.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 11.10.2026, without references to retired models or APIs.

Licence

MPL-2.0, otwarta.

What it does and when to use it

Use when editing, adding, or reviewing a WebGL shader mode in src/components/DitherBackground.tsx (the notebook backdrop, one GLSL program with 20 theme-driven modes) or src/components/settings/TileShader.tsx (Activity tile washes), or when a theme in src/lib/themes.ts gets a new `shader` variant. Renders the real GLSL in a browser harness so the change is seen before it ships.

Original author description

Use when editing, adding, or reviewing a WebGL shader mode in src/components/DitherBackground.tsx (the notebook backdrop, one GLSL program with 20 theme-driven modes) or src/components/settings/TileShader.tsx (Activity tile washes), or when a theme in src/lib/themes.ts gets a new `shader` variant. Renders the real GLSL in a browser harness so the change is seen before it ships.

How it works

  1. The loop
  2. Harness internals worth knowing
Original SKILL.md headings · 58 lines, 423 words
SKILL.md preview
---
name: shaders
description: Use when editing, adding, or reviewing a WebGL shader mode in src/components/DitherBackground.tsx (the notebook backdrop, one GLSL program with 20 theme-driven modes) or src/components/settings/TileShader.tsx (Activity tile washes), or when a theme in src/lib/themes.ts gets a new `shader` variant. Renders the real GLSL in a browser harness so the change is seen before it ships.
---

# Shaders — render before you ship

Both shader components are GLSL ES 1.0 inside `FRAG` template literals,
compiled by WebGL1 at runtime. That choice is deliberate (WKWebView on every
macOS, no WebGPU) — keep the WebGL1 constraints: no dynamic array indexing,
constant-bound loops, no `${}` in the literals (the harness refuses them).

Two facts drive the workflow:

- **One program serves every theme.** A GLSL error in the mode you're adding
  kills the backdrop for all 37 themes. Compile is the first gate.
- **Aesthetic misses are confident.** Writing a "bokeh city lights" field
  from the words alone produced an abstract plexus. The only reliable check
  is the rendered pixels next to a reference image.

## The loop

```bash
python3 scripts/shader-harness.py --serve    # http://127.0.0.1:8791/
```

or `preview_start` with the `shaders` launch config, which runs the same
command. The page is written once at start — after each `FRAG` edit rerun
`python3 scripts/shader-harness.py` (no flags) to regenerate it in place,
then reload.

1. **Ask for a reference image** when the request names a style. It carries
   more than the name does.
2. **Edit** the field function in the `.tsx`. New backdrop mode: add the
   `ShaderVariant` union member in `themes.ts`, the `SHADER_MODE` index, a
   `<name>Field(uv, glow)` function, and its branch in `main()`. Keep the
   shared dither, central glow, and transmutation ring — they are what make
   every mode read as the same element.
3. **Regenerate, reload, read status.** `<html data-status>` is `ok` or
   `fail`; the red banner (and `console.error`) carries the GLSL log with
   line numbers relative to the `FRAG` literal.
4. **Look.** The contact sheet (`/`) shows every mode with the theme that
   uses it. `?mode=<name>&theme=<id>` fills the viewport with one;
   `&t=<seconds>` freezes time for a deterministic screenshot;
   `&density=` / `&gain=` are the component's `density` / `intensity`
   props; `?shader=tile&mode=ember|sky|spark` (`&hour=`, `&series=a,b,c`)
   covers the tiles. Screenshot, compare with the reference, iterate.
5. **Check motion too** — drop `t` and watch a few seconds; the field should
   breathe, not scroll. Then check the app itself (`pnpm tauri dev`), since
   ANGLE-on-Metal in WKWebView is what ships.

## Harness internals worth knowing

- It regex-extracts `VERT`/`FRAG`/`SHADER_MODE` from the two components and
  each theme's `id`/`shader`/`background`/`primary` from `themes.ts`, so it
  needs no build step and no dependencies beyond Python 3.
- The sheet renders 22 cells through two shared offscreen WebGL contexts
  (opaque backdrop, alpha tiles) blitted into 2D canvases — browsers evict
  contexts past ~16, which is what a per-cell design hits.
- The Browser pane pauses `requestAnimationFrame` while hidden; front the
  tab before reading pixels or status.

Versions

RepositoryScoreLicence
This page · thrashr888/alchemy100MPL-2.0
shader-effects-inc/shaders100MIT
leex852/skills100MIT
whoamnesia/astudio-motion90MIT

Database snapshot: 13.11.2026 · package version f4a8ee00dc6b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100shader-core-glsl
    Use to write or debug GLSL shaders, uniforms, ShaderMaterial and WebGL color/UV bugs; not WebGPU TSL or shader QA.
  • 100shadertoy
    This skill should be used when working with Shadertoy shaders, GLSL fragment shaders, or creating procedural graphics for the web. Use when writing .glsl files, implementing visual effects, creating generative art, or working with WebGL shader code. This skill provides GLSL ES…
  • 100webgl
    Render 3D graphics in the browser with WebGL — set up rendering pipelines, write vertex and fragment shaders in GLSL, manage buffers and textures, handle camera transformations, and build interactive 3D scenes. Use when tasks involve 3D visualization, GPU-accelerated rendering,…
  • 100glsl-to-metal
    Convert GLSL fragment shaders and Shadertoy effects into Metal for iOS and macOS, using SwiftUI stitchable shaders where suitable and a Metal renderer when needed. Use for shader ports or explicitly requested reconstructions of web shader effects.
  • 90paper-shaders
    Integrate and diagnose Paper Shaders from paper-design/shaders: choose vanilla or React packages, mount a named shader, tune uniforms and rendering bounds, freeze motion, and release its WebGL resources. Use when the request names Paper Shaders, @paper-design/shaders,…
  • 100experience-ui-bundle-frontend-generate
    MUST activate before editing ANY file under uiBundles/*/src/ (or the bundle's index.html) for visual or UI changes to an EXISTING app — pages, components, sections, layout, styling, colors, fonts, navigation, animations, branding, or any look-and-feel change. Use this skill when…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.