记忆

ShaderToy

试用

Write, explain, debug, and port ShaderToy-style fragment shaders. Use when the user asks for ShaderToy code, wants help with `mainImage`, `fragCoord`, `iTime...

它能做什么

Use this skill for ShaderToy-native work and ShaderToy-to-runtime migration.

技能文档

ShaderToy

Use this skill for ShaderToy-native work and ShaderToy-to-runtime migration.

This skill is narrower than shader. If the problem is fundamentally about ShaderToy built-ins, mainImage, channels, buffers, or porting out of ShaderToy, use this one first.

Workflow

1. Confirm the ShaderToy shape

Resolve these first:

  • single Image pass or multi-pass with Buffer A/B/C/D
  • uses of iTime, iResolution, iMouse
  • channel usage: iChannel0..3
  • whether the code is pure procedural or samples textures / buffers

If the user posts ShaderToy code, keep the original structure visible until the effect works.

2. Debug in ShaderToy terms first

Before porting, reduce the effect inside ShaderToy conventions:

  • replace output with a constant color
  • visualize fragCoord / iResolution.xy
  • bypass texture reads and channels temporarily
  • isolate one term at a time

Read references/builtins.md for the built-in variable map.

3. Port only after the effect is understood

When porting away from ShaderToy:

  • convert mainImage(out vec4 fragColor, in vec2 fragCoord) to the host entry point
  • replace built-ins with explicit uniforms
  • recreate full-screen quad or postprocess host setup
  • account for channel textures and buffer passes explicitly

Read references/porting.md before rewriting host-side glue.

4. Keep answers concrete

Prefer:

  • a corrected ShaderToy fragment shader
  • a mapping of built-ins to host uniforms
  • a minimal migration plan
  • the first likely failure point

Commands

Inspect built-ins and channels

node {baseDir}/scripts/shadertoy.js builtins
node {baseDir}/scripts/shadertoy.js channels --json

Generate a porting checklist

node {baseDir}/scripts/shadertoy.js port three
node {baseDir}/scripts/shadertoy.js port webgl --json

Use this when converting ShaderToy code into another runtime.

node {baseDir}/scripts/shadertoy.js debug black-screen
node {baseDir}/scripts/shadertoy.js debug channels

Generate an intake plan

node {baseDir}/scripts/shadertoy.js intake "port a shadertoy ocean to r3f"
node {baseDir}/scripts/shadertoy.js intake "fix my iChannel feedback effect" --json

Pick the right demo starting point

node {baseDir}/scripts/shadertoy.js demo single-pass
node {baseDir}/scripts/shadertoy.js demo feedback --json

Generate a scaffold recommendation

node {baseDir}/scripts/shadertoy.js scaffold three single-pass
node {baseDir}/scripts/shadertoy.js scaffold webgl feedback --json

Use this when the user wants the fastest route from a ShaderToy idea to a runnable host setup.

Assets

Bundled templates:

  • assets/shadertoy-single-pass-demo/index.html
  • assets/shadertoy-feedback-notes.txt

References

  • Built-ins, channels, and pass semantics: references/builtins.md
  • Migration rules to WebGL / Three.js / R3F: references/porting.md
  • Buffer and feedback triage: references/buffers-feedback.md

Guardrails

  • Keep ShaderToy naming intact until the effect is understood.
  • Do not invent channels or buffer passes the user did not specify.
  • If the shader relies on buffers or feedback, say so explicitly before pretending it is a single-pass effect.
  • When porting, make every implicit ShaderToy input explicit in the host code.

相关技能

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。

作者 Iván855 次安装69 星标

以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。

作者 johnpatternai22 次安装8 星标

在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。

作者 Iván559 次安装18 星标

从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。

作者 fly0pants4.3k 次安装296 星标

jvy 的更多技能

浏览全部技能

面向中文办公场景的 WPS 文档、表格与演示处理及格式兼容。

作者 jvy142 次安装4 星标

Create Apache ECharts option JSON, standalone HTML chart pages, and export-ready chart artifacts from CSV, TSV, JSON tables, or existing option configs. Use...

作者 jvy23 次安装

Gitee operations via OpenAPI and git: repositories, pull requests, issues, comments, and file contents. Use when: (1) inspecting or creating Gitee pull reque...

作者 jvy36 次安装1 星标

Write, explain, adapt, and debug practical shader code for GLSL, WebGL, Three.js ShaderMaterial, React Three Fiber, postprocess-style full-screen effects, an...

作者 jvy24 次安装1 星标

Build, debug, and integrate OpenLayers web maps, including map/view setup, XYZ and OSM base layers, vector sources, GeoJSON overlays, Web Mercator and WGS84...

作者 jvy17 次安装

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...

作者 jvy18 次安装