返回顶部
s

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
安全检测
已通过
122
下载量
0
收藏
概述
安装方式
版本历史

shadertoy

# 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 ```bash node {baseDir}/scripts/shadertoy.js builtins node {baseDir}/scripts/shadertoy.js channels --json ``` ### Generate a porting checklist ```bash node {baseDir}/scripts/shadertoy.js port three node {baseDir}/scripts/shadertoy.js port webgl --json ``` Use this when converting ShaderToy code into another runtime. ### Print a debug checklist ```bash node {baseDir}/scripts/shadertoy.js debug black-screen node {baseDir}/scripts/shadertoy.js debug channels ``` ### Generate an intake plan ```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 ``` ### Pick the right demo starting point ```bash node {baseDir}/scripts/shadertoy.js demo single-pass node {baseDir}/scripts/shadertoy.js demo feedback --json ``` ### Generate a scaffold recommendation ```bash 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.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 shadertoy-1776110953 技能

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

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

通过命令行安装

skillhub install shadertoy-1776110953

下载 Zip 包

⬇ 下载 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.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部