Agent Skills
› NeverSight/learn-skills.dev
› wgpu-shader
wgpu-shader
GitHub用于实现和调试wgpu渲染及着色器阶段,涵盖曝光等效果构建、伪影排查、GPU/CPU一致性校验及性能调优。
触发场景
构建着色器阶段以实现曝光、对比度等视觉效果
调试渲染伪影、精度问题或管线排序错误
优化预览延迟和GPU内存传输
安装
npx skills add NeverSight/learn-skills.dev --skill wgpu-shader -g -y
SKILL.md
Frontmatter
{
"name": "wgpu-shader",
"description": "Use when implementing or debugging wgpu rendering and shader stages for preview or export pipelines, including GPU\/CPU parity checks and performance tuning."
}
WGPU Shader
Use This Skill When
- Building shader stages for exposure, contrast, temperature, tint, highlights, or shadows.
- Debugging render artifacts, precision issues, or pipeline ordering.
- Optimizing preview latency and GPU memory movement.
Required Inputs
- Target pipeline stage and expected visual effect.
- Input/output color-space expectation.
- Performance target for the operation.
Workflow
- Define stage contract: input texture format, output format, uniforms.
- Implement shader with deterministic parameter mapping.
- Validate against a CPU reference on sample images.
- Instrument GPU timings for p50 and p95.
- Optimize bandwidth and pass count only after correctness.
Guardrails
- Minimize CPU-GPU round trips.
- Keep shader parameters versioned with app-side structs.
- Reject visual change without before/after evidence.
Output Contract
- Shader code + pipeline binding updates.
- Validation notes against reference output.
- Timing snapshot with target comparison.
版本历史
- c3c0a1e 当前 2026-07-23 10:51


