把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
编程
Shader Helper
试用Write, explain, adapt, and debug practical shader code for GLSL, WebGL, Three.js ShaderMaterial, React Three Fiber, postprocess-style full-screen effects, an...
它能做什么
Use this skill to turn shader requests into runnable code and fast debugging steps.
技能文档
Shader
Use this skill to turn shader requests into runnable code and fast debugging steps.
Default target: browser-friendly GLSL. If the runtime is unclear, narrow it before writing code:
- ShaderToy fragment-only
- raw WebGL / GLSL ES
- Three.js
ShaderMaterial - React Three Fiber
- postprocess-style full-screen pass
Workflow
1. Lock the runtime and effect shape
Resolve these first:
- runtime
- fragment-only vs vertex + fragment
- screen effect vs material effect vs postprocess pass
- required inputs:
uTime,uResolution, UVs, normals, textures, mouse
If the request is vague, start with the smallest visible version of the effect.
2. Build from a visible baseline
- Start with a constant color or UV gradient.
- Add one moving term at a time.
- Reintroduce uniforms, varyings, noise, lighting, and distortion step by step.
For blank output, compile failures, or “nothing shows”, read references/black-screen-checklist.md.
3. Match the host, not the idea source
Do not hand over ShaderToy code unchanged if the user asked for Three.js or R3F.
Common translations:
iTime->uTimeiResolution->uResolutionfragCoord->gl_FragCoord.xy- ShaderToy fullscreen logic -> quad / plane / postprocess host setup
For live previews inside OpenClaw, pair this skill with canvas.
4. Keep answers practical
Prefer responses that include:
- runnable shader code
- required uniforms and defaults
- host-side glue code
- the first debugging step if it fails
Common Uses
- Full-screen effects: flowing gradients, ripples, ShaderToy-style animated backgrounds
- Material effects: fresnel, dissolve, edge glow, scanlines, vertex wobble
- Porting: ShaderToy -> WebGL / Three.js / R3F
- Debugging: black screen, all-white / all-black output, broken UVs, wrong varyings, missing uniforms
Commands
Intake
node {baseDir}/scripts/shader.js intake "fullscreen ocean background in three.js"
node {baseDir}/scripts/shader.js intake "port this shadertoy to r3f" --json
Use this to structure an underspecified request.
Debug
node {baseDir}/scripts/shader.js debug black-screen
node {baseDir}/scripts/shader.js debug uniform
node {baseDir}/scripts/shader.js debug varyings
Effects
node {baseDir}/scripts/shader.js effects
Maps user phrases to likely starter techniques like gradient, noise, fresnel, dissolve, ripple, scanline, and pixelate.
Boilerplate
node {baseDir}/scripts/shader.js boilerplate fresnel
node {baseDir}/scripts/shader.js boilerplate dissolve --json
Returns stage split, likely uniforms, varyings, build order, and common failure points.
Snippet
node {baseDir}/scripts/shader.js snippet fresnel
node {baseDir}/scripts/shader.js snippet ripple --json
Points to the nearest bundled GLSL starter.
Demo
node {baseDir}/scripts/shader.js demo webgl ripple
node {baseDir}/scripts/shader.js demo r3f fresnel --json
Chooses the best bundled runtime template for a target + effect combination.
Scaffold
node {baseDir}/scripts/shader.js scaffold r3f dissolve
node {baseDir}/scripts/shader.js scaffold postprocess scanline --json
Combines the nearest demo, boilerplate, snippet, and first integration steps.
Assets
Bundled templates:
assets/webgl-fullscreen-demo/index.htmlassets/threejs-material-demo/index.htmlassets/postprocess-demo/index.htmlassets/r3f-demo/App.jsxassets/r3f-demo/main.jsxassets/r3f-demo/index.htmlassets/r3f-demo/package.jsonassets/r3f-demo/vite.config.js
Bundled snippets:
assets/snippets/fresnel.mdassets/snippets/dissolve.mdassets/snippets/ripple.mdassets/snippets/scanline.mdassets/snippets/pixelate.mdassets/snippets/vertex-wobble.md
Use the postprocess template for screen-space effects. Use the Three.js or R3F templates for mesh/material effects.
References
references/glsl-quick-reference.mdreferences/black-screen-checklist.mdreferences/effect-starters-zh.mdreferences/snippets.mdreferences/runtime-translation.md
Guardrails
- Default to the smallest working shader that proves the effect.
- Use host-friendly uniform names like
uTime,uResolution,uMouse,uTexture. - Do not assume WebGL2 unless the host clearly uses it.
- Do not invent runtime-specific macros or built-ins.
- Call out likely precision, color-space, or postprocess-order bugs explicitly.
- For performance advice, stay directional unless the actual runtime and GPU are known.
相关技能
编写、调试与调优 Playwright 测试,涵盖定位器策略、追踪诊断与 CI 友好的超时配置。
诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。
以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。
在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。
执行 Git 操作(提交、分支、合并、变基、冲突解决与恢复)时强制套用安全规则。
jvy 的更多技能
浏览全部技能面向中文办公场景的 WPS 文档、表格与演示处理及格式兼容。
Create Apache ECharts option JSON, standalone HTML chart pages, and export-ready chart artifacts from CSV, TSV, JSON tables, or existing option configs. Use...
Gitee operations via OpenAPI and git: repositories, pull requests, issues, comments, and file contents. Use when: (1) inspecting or creating Gitee pull reque...
Build, debug, and integrate OpenLayers web maps, including map/view setup, XYZ and OSM base layers, vector sources, GeoJSON overlays, Web Mercator and WGS84...
Research public holidays, bank holidays, observed days, school breaks, and make-up workdays for any country or region. Use when the user asks whether a speci...
Explain and work with the CGCS2000 coordinate reference system for China geospatial workflows, including EPSG:4490 interpretation, projected CRS selection, G...