Agent skill

makepad-2.0-shaders

makepad shader, Sdf2d, pixel shader, draw_bg, draw_text, draw_quad, makepad gpu, shader function, pixel fn, vertex fn, instance, uniform, shader variable, sdf, premultiply, Pal.premul, GaussShadow, makepad graphics, custom draw, DrawQuad, DrawVector, 着色器, 像素, 渲染, 自定义绘制, 距离场

ZhangHanDonggithub.com/ZhangHanDongGitHub ↗
claude-code
Install
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-shaders --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 14 KB
Bundled scripts: none
Path: skills/makepad-2.0-shaders/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 745

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Makepad 2.0 Shader Skill > **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-03-03 ## Overview Makepad uses a custom GPU shader system integrated into the widget property tree. Shaders are defined inline using `pixel: fn() { ... }` and `vertex: fn() { ... }` blocks within `draw_bg`, `draw_text`, or custom draw objects. ## Documentation Refer to the local files for detailed documentation: - `./references/shader-reference.md` - Shader syntax, variables, built-ins, custom functions - `./references/sdf2d-reference.md` - SDF2D primitives, combinators, drawing operations --- ## Shader Basics ### Pixel Shader Structure ``` draw_bg +: { // Declare variables instance hover: 0.0 // Animatable per-instance uniform accent: #4488ff // Shared across all instances pixel: fn() { let sdf = Sdf2d.viewport(self.pos * self.rect_size) // ... SDF operations ... return sdf.result } } ``` ### Variable Types | Type | Declaration | Animatable | Scope | |------|-------------|-----------|-------| | `instance` | `instance hover: 0.0` | Yes (via Animator) | Per-widget instance | | `uniform` | `uniform color: #fff` | No | Shared across instances | | `texture_2d` | `texture_2d tex: none` | No |

What's inside
Steps it walks through
  1. Overview
  2. Documentation
  3. Shader Basics
  4. Pixel Shader Structure
  5. Variable Types
  6. Built-in Variables
  7. CRITICAL: Premultiply Alpha
  8. SDF2D Quick Reference
  9. Setup
  10. Primitives
  11. Drawing
  12. Combinators
  13. Transforms
  14. Color Operations
Ships with 2 files
  • references/sdf2d-reference.md
  • references/shader-reference.md
More from makepad-skills
All skills →
About this skill
What does the makepad-2.0-shaders skill do?

makepad shader, Sdf2d, pixel shader, draw_bg, draw_text, draw_quad, makepad gpu, shader function, pixel fn, vertex fn, instance, uniform, shader variable, sdf, premultiply, Pal.premul, GaussShadow, makepad graphics, custom draw, DrawQuad, DrawVector, 着色器, 像素, 渲染, 自定义绘制, 距离场

How do I install it?

Run `npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-shaders --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ZhangHanDong/makepad-skills, a repository with 745 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going