본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)48k · #5153

makepad-shaders

하는 일

Makepad 시스템에서 ‘셰이더’라고 부르는 시각 코드를 만들고 이해하도록 돕습니다. 이 코드는 색상, 모양, 효과 등 화면에 그래픽 요소가 그려지는 방식을 제어합니다.

사용하는 경우

  • ✓Makepad에서 요소에 맞춤형 모습을 만들고 싶을 때.
  • ✓코드로 복잡한 모양이나 애니메이션을 그릴 때.
  • ✓Makepad의 기존 셰이더를 이해하거나 수정하려 할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-shaders/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-shaders/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“파란색 그라데이션과 둥근 테두리가 있는 버튼용 셰이더를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

그리고 싶은 것에 대한 설명을 제공하면 AI가 셰이더 코드를 생성합니다. 도형을 정의하기 위해 Sdf2d라는 시스템을 사용하며, 최종 코드는 Makepad의 셰이더 언어로 작성됩니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

  • ./references/shader-basics.md
  • ./references/sdf2d-reference.md

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

Makepad Shaders Skill

Version: makepad-widgets (dev branch) | Last Updated: 2026-01-19

Check for updates: https://crates.io/crates/makepad-widgets

You are an expert at Makepad shaders. Help users by:

  • Writing code: Generate shader code following the patterns below
  • Answering questions: Explain shader language, Sdf2d, built-in functions

When to Use

  • You need to write or debug Makepad shader code, custom drawing, or SDF-based visuals.
  • The task involves draw_bg, Sdf2d, gradients, effects, or GPU-rendered widget appearance.
  • You want Makepad shader patterns and APIs rather than generic GLSL advice.

Documentation

Refer to the local files for detailed documentation:

  • ./references/shader-basics.md - Shader language fundamentals
  • ./references/sdf2d-reference.md - Complete Sdf2d API reference

Advanced Patterns

For production-ready shader patterns, see the _base/ directory:

Pattern Description
01-shader-structure Shader fundamentals
02-shader-math Mathematical functions
03-sdf-shapes SDF shape primitives
04-sdf-drawing Advanced SDF drawing
05-progress-track Progress indicators
09-loading-spinner Loading animations
10-hover-effect Hover visual effects
11-gradient-effects Color gradients
12-shadow-glow Shadow and glow
13-disabled-state Disabled visuals
14-toggle-checkbox Toggle animations

Community contributions: ./community/

IMPORTANT: Documentation Completeness Check

Before answering questions, Claude MUST:

  1. Read the relevant reference file(s) listed above
  2. If file read fails or file is empty:
    • Inform user: "本地文档不完整,建议运行 /sync-crate-skills makepad --force 更新文档"
    • Still answer based on SKILL.md patterns + built-in knowledge
  3. If reference file exists, incorporate its content into the answer

Key Patterns

1. Basic Custom Shader

<View> {
    show_bg: true
    draw_bg: {
        // Shader uniforms
        color: #FF0000

        // Custom pixel shader
        fn pixel(self) -> vec4 {
            return self.color;
        }
    }
}

2. Rounded Rectangle with Border

<View> {
    show_bg: true
    draw_bg: {
        color: #333333
        border_color: #666666
        border_radius: 8.0
        border_size: 1.0

        fn pixel(self) -> vec4 {
            let sdf = Sdf2d::viewport(self.pos * self.rect_size);
            sdf.box(1.0, 1.0,
                    self.rect_size.x - 2.0,
                    self.rect_size.y - 2.0,
                    self.border_radius);
            sdf.fill_keep(self.color);
            sdf.stroke(self.border_color, self.border_size);
            return sdf.result;
        }
    }
}

3. Gradient Background

<View> {
    show_bg: true
    draw_bg: {
        color: #FF0000
        color_2: #0000FF

        fn pixel(self) -> vec4 {
            let t = self.pos.x;  // Horizontal gradient
            return mix(self.color, self.color_2, t);
        }
    }
}

4. Circle Shape

<View> {
    show_bg: true
    draw_bg: {
        color: #0066CC

        fn pixel(self) -> vec4 {
            let sdf = Sdf2d::viewport(self.pos * self.rect_size);
            let center = self.rect_size * 0.5;
            let radius = min(center.x, center.y) - 1.0;
            sdf.circle(center.x, center.y, radius);
            sdf.fill(self.color);
            return sdf.result;
        }
    }
}

Shader Structure

Component Description

…

자주 묻는 질문

셰이더란 무엇인가요?

그래픽 카드(GPU)에서 실행되어 화면의 각 픽셀 색을 정하는 작은 프로그램으로, 복잡한 시각 효과를 가능하게 합니다.

Sdf2d란 무엇인가요?

‘부호 있는 거리장(signed distance fields)’이라는 방법을 사용해 기하학적 도형과 시각 효과를 더 쉽게 만들도록 하는 Makepad의 특별한 도구입니다.

이것을 쓰려면 프로그래밍을 알아야 하나요?

경험 많은 프로그래머일 필요는 없습니다. AI가 코드를 만들어 주고, 코드가 무엇을 하는지 질문해 이해할 수 있습니다.

상세 정보

작성자의 원본 설명

CRITICAL: Use for Makepad shader system. Triggers on: makepad shader, makepad draw_bg, Sdf2d, makepad pixel, makepad glsl, makepad sdf, draw_quad, makepad gpu, makepad 着色器, makepad shader 语法, makepad 绘制

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5153
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬