Skip to content
Back to skills

Shaders

ASecurity

Shaders by astudio: GLSL (WebGL2 / ShaderToy style), WGSL and TSL for the web - brand backgrounds (domain-warped noise, gradients in the brand palette, liquid/ink/paper/light), image hover and transition distortions, 2D SDF shapes and metaballs, raymarched 3D without models, particles, post-processing (grain, bloom, grading, glitch), shaders inside Three.js/R3F materials, PixiJS filters and Figma shader fills - compiled and rendered to frames for review with scripts/motion.cjs shader, with pe...

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 16, 2026
ai-agentsgonodeperformance

Works with

  • cli

Security analysis

A100/100

Pro scans all 18 files and shows the line behind each finding

Scanned November 16, 2026

npx -y skills add whoamnesia/astudio-motion --skill shaders --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shaders?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Shaders
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/whoamnesia-shaders/badge)](https://www.skillsdirectory.com/skills/whoamnesia-shaders)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: shaders
description: >-
  Shaders by astudio: GLSL (WebGL2 / ShaderToy style), WGSL and TSL for the web - brand backgrounds (domain-warped
  noise, gradients in the brand palette, liquid/ink/paper/light), image hover and transition distortions, 2D SDF
  shapes and metaballs, raymarched 3D without models, particles, post-processing (grain, bloom, grading, glitch),
  shaders inside Three.js/R3F materials, PixiJS filters and Figma shader fills - compiled and rendered to frames for
  review with scripts/motion.cjs shader, with performance budgets and fallbacks. Use for "шейдер", "GLSL",
  "shader background", "noise gradient", "distortion effect", "raymarching", "WebGL эффект", "fragment shader".
argument-hint: "[the look or effect] [where it runs: page background, three.js material, image hover, video]"
---

# astudio · Shaders

Role: Senior Creative Developer (graphics) at astudio.one (15+ years) - shaders that look like the brand's world,
not a generic gradient, and that a mid-range laptop runs at 60fps. Bar: `<root>/reference/studio-bar.md`; `<root>` =
two levels above this skill's base directory, or the folder holding `scripts/motion.cjs`.

## Workflow
1. **Derive the look from the subject** - what physical thing should it feel like (coffee crema, ink in water, paper
   grain, sunlight through blinds, liquid metal, a printed halftone)? Palette = brand tokens (cosine palette fitted
   to them, `references/library/color-palette.md`). Never the default purple-blue mesh gradient.
2. **Pick techniques** - `search.py "<look>" -d shader` -> the library file(s) in `references/library/`
   (procedural-noise, domain-warping, sdf-2d/3d, ray-marching, polar-uv, procedural-2d-pattern, voronoi, lighting,
   normal-estimation, post-processing, camera-effects, particle-system, color-palette, webgl-pitfalls). Read the file
   before writing code.
3. **Write it** ShaderToy-style (`void mainImage(out vec4 fragColor, in vec2 fragCoord)` with `iTime`, `iResolution`,
   `iMouse`) - the renderer and most hosts can run it; port to the host after it looks right (`references/hosts.md`:
   standalone WebGL2 page, Three.js ShaderMaterial/TSL, R3F, PixiJS filter, Figma shader).
4. **Compile and look** - `node <root>/scripts/motion.cjs shader effect.frag --frames 8 [--uniforms '{"uAccent":[0.88,0.35,0.16]}']`
   reports compile errors with your line numbers and renders a strip over time; `--video --duration 6` for a loop.
   Judge: does it read as the intended material? Is the motion speed calm enough to sit behind text (0.05-0.3
   units/s)? Any banding (add dithering/grain), aliasing (AA), hot spots under text?
5. **Integrate** - fullscreen triangle (not a quad), DPR 1 for backgrounds, 30fps cap for ambient effects, pause
   off-screen and on `visibilitychange`, pointer uniforms lerped (no jumps), a CSS gradient/poster fallback, static
   frame under reduced motion, text contrast checked over the brightest frame.

## WebGL2 rules (standalone pages) - `references/webgl2-rules.md`
`#version 300 es` first line, `precision highp float;`, `out vec4 fragColor;`, `in/out` instead of
attribute/varying, `texture()` not texture2D, `gl_FragCoord.xy` (no fragCoord built-in), wrap `mainImage` in
`main()`, define functions before use, `const` instead of `#define` with function calls, trim script text so
`#version` is the first character, explicit float literals (`1.0`), no dynamic loop bounds on old GPUs.

## Rules
- Aspect-correct coordinates: `vec2 uv = (2.0 * gl_FragCoord.xy - iResolution.xy) / iResolution.y;`.
- Colour: work in linear, output sRGB (Three.js does this when `outputColorSpace` is sRGB; standalone: `pow(col, 1/2.2)`
  or a proper OETF); add 1-2% blue-noise/grain dithering against banding.
- Time: `iTime * speed` with a speed constant; loops = periodic functions of `iTime / duration * 2π`; for video the
  host feeds time from the master timeline (`__seek`).
- Cost: count texture taps and loop iterations; FBM 4-6 octaves max for backgrounds; raymarch <= 64-100 steps with
  early exit; multipass (ping-pong) only when the look needs simulation.
- Accessibility: no flashing > 3/s, no high-contrast strobing; reduced motion = a still frame (seek to a good t).
- Licences: library techniques are MIT (MiniMax, see NOTICE.md); Shadertoy code is often CC BY-NC-SA - don't copy it
  into client work; reimplement from technique.

Files in this skill

  • SKILL.md4.3 KB
  • references/hosts.md3.2 KB
  • references/library/camera-effects.md3.6 KB
  • references/library/color-palette.md13 KB
  • references/library/domain-warping.md12.7 KB
  • references/library/lighting-model.md17.2 KB
  • references/library/normal-estimation.md9.2 KB
  • references/library/particle-system.md44.7 KB
  • references/library/polar-uv-manipulation.md13.4 KB
  • references/library/post-processing.md30.4 KB
  • references/library/procedural-2d-pattern.md10.8 KB
  • references/library/procedural-noise.md17 KB
  • references/library/ray-marching.md13.8 KB
  • references/library/sdf-2d.md21.4 KB
  • references/library/sdf-3d.md21.8 KB
  • references/library/voronoi-cellular-noise.md13.1 KB
  • references/library/webgl-pitfalls.md5.6 KB
  • references/webgl2-rules.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.