闲社服务运行正常AI智能体自动化平台
s

ShaderToy助手

技能标识:shadertoy

Write, explain, debug, and port ShaderToy-style fragment shaders. Use when the user asks for ShaderToy code, wants help with `mainImage`, `fragCoord`, `iTime`, `iResolution`, `iMouse`, `iChannel0..3`, buffer passes, common fullscreen coordinate math, or needs to migrate a ShaderToy effect into raw WebGL, Three.js, React Three Fiber, or a browser canvas demo. NOT for general material shaders, vertex shaders, or non-ShaderToy rendering pipelines unless the task clearly starts from ShaderToy code o

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

ShaderToy助手

ShaderToy

使用此技能处理ShaderToy原生工作以及从ShaderToy迁移到运行时环境。

此技能比shader更具体。如果问题本质上涉及ShaderToy内置函数、mainImage、通道、缓冲区或从ShaderToy移植,请优先使用此技能。

工作流程

1. 确认ShaderToy结构

首先解决以下问题:

  • - 单次Image渲染还是使用Buffer A/B/C/D的多通道渲染
  • 是否使用iTime、iResolution、iMouse
  • 通道使用情况:iChannel0..3
  • 代码是纯程序化生成还是采样纹理/缓冲区

如果用户发布了ShaderToy代码,在效果正常工作前保持原始结构可见。

2. 先在ShaderToy层面调试

在移植之前,先在ShaderToy约定范围内简化效果:

  • - 用常量颜色替换输出
  • 可视化fragCoord / iResolution.xy
  • 临时绕过纹理读取和通道
  • 一次隔离一个变量

阅读references/builtins.md了解内置变量映射。

3. 理解效果后再移植

当从ShaderToy移植时:

  • - 将mainImage(out vec4 fragColor, in vec2 fragCoord)转换为主机入口点
  • 用显式uniform替换内置变量
  • 重建全屏四边形或后处理主机设置
  • 明确处理通道纹理和缓冲区渲染

在重写主机端胶水代码前阅读references/porting.md。

4. 保持答案具体

优先提供:

  • - 修正后的ShaderToy片段着色器
  • 内置变量到主机uniform的映射
  • 最小化迁移方案
  • 最可能的失败点

命令

检查内置变量和通道

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

生成移植检查清单

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

在将ShaderToy代码转换到其他运行时环境时使用此命令。

打印调试检查清单

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

生成导入方案

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

选择正确的演示起点

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

生成脚手架推荐

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

当用户希望从ShaderToy创意到可运行主机设置的最快路径时使用此命令。

资源

捆绑模板:

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

参考资料

  • - 内置变量、通道和渲染语义:references/builtins.md
  • 迁移到WebGL / Three.js / R3F的规则:references/porting.md
  • 缓冲区和反馈分类:references/buffers-feedback.md

防护措施

  • - 在理解效果前保持ShaderToy命名不变。
  • 不要发明用户未指定的通道或缓冲区渲染。
  • 如果着色器依赖缓冲区或反馈,在将其视为单次渲染效果前明确说明。
  • 移植时,在主机代码中将每个隐式的ShaderToy输入显式化。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 shadertoy-1776110953 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 shadertoy-1776110953 技能

通过命令行安装

skillhub install shadertoy-1776110953

下载

⬇ 下载 shadertoy v1.0.0(免费)

文件大小: 9.07 KB | 发布时间: 2026-4-14 11:01

v1.0.0 最新 2026-4-14 11:01
Initial release of the shadertoy skill.

- Provides workflows and commands for writing, explaining, debugging, and porting ShaderToy-style fragment shaders.
- Focuses exclusively on ShaderToy built-ins, mainImage, channels, buffers, and migration to other runtimes like WebGL or Three.js.
- Includes command-line helpers for inspecting built-ins, generating porting/debug checklists, and demo scaffolds.
- Contains bundled demo templates and reference guides for ShaderToy concepts and migration.
- Adds explicit guardrails to ensure ShaderToy-specific conventions are maintained throughout troubleshooting and porting.
返回顶部