Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计提醒

shader-programming着色器编程

Agent Skill

shader-programming 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

353

周安装

15

GitHub Stars

4

下载量

124
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:shader-programming(着色器编程)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/shader-programming
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill shader-programming
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill shader-programming

简介

shader-programming 用于编写与优化 GLSL/HLSL 着色器代码,适用于游戏引擎与图形渲染开发。

  • 支持顶点、片段及计算着色器的生成与调试,兼容 OpenGL、Vulkan 等平台。
  • 可用于实现水面反射、后期特效等高级视觉功能,提升渲染性能。
  • 需熟悉 GPU 架构与 API 规范,避免过度采样或内存泄漏影响帧率。
  • 建议在沙箱环境中测试着色器,再集成到生产项目以减少崩溃风险。

SKILL.md

Purpose

This skill allows OpenClaw to generate, optimize, and debug GLSL or HLSL shaders for real-time graphics in game engines. It focuses on tasks like writing vertex, fragment, or compute shaders, ensuring compatibility with APIs like OpenGL, Vulkan, or DirectX.

When to Use

Use this skill when users request custom shaders for visual effects, performance tweaks, or integration with game engines. Specifically:

  • Optimizing shaders for mobile games to reduce GPU load (e.g., minimizing texture samples).
  • Creating advanced effects like water rendering or post-processing in tools like Unity or Unreal.
  • Debugging shader code during game development iterations.

Key Capabilities

  • Generate complete GLSL/HLSL code snippets based on user specs (e.g., shader type, inputs, outputs).
  • Optimize shaders by analyzing and modifying code for better performance, such as reducing instructions or using precision qualifiers.
  • Debug common issues like compilation errors or runtime artifacts by suggesting fixes.
  • Support shader versions like GLSL 330 or HLSL 5.0, with checks for hardware compatibility.

Usage Patterns

To invoke this skill in OpenClaw, use the command: openclaw execute shader-programming --task <task-type> --input <details>. Always specify the shader language (e.g., --lang glsl) and target platform (e.g., --platform vulkan). For code generation, provide a JSON config like: {"type": "vertex", "inputs": ["position", "normal"], "outputs": ["gl_Position"]}. Follow this pattern:

  • Start with a clear task: e.g., openclaw execute shader-programming --task generate --lang hlsl --input '{"features": ["lighting"]}'.
  • For optimization, pipe existing code: e.g., echo "existing shader code" | openclaw execute shader-programming --task optimize --lang glsl.
  • If authentication is needed (e.g., for external compilers), set $OPENCLAW_API_KEY in your environment before running commands.

Common Commands/API

Use these OpenClaw-integrated commands for shader tasks:

  • Compile GLSL shaders: Run glslangValidator -V -o output.spv input.vert via OpenClaw's subprocess, e.g., openclaw execute shader-programming --subprocess "glslangValidator -V -o myShader.spv myShader.vert".
  • Compile HLSL shaders: Use fxc /T vs_5_0 /E MainVS /Fo compiled.bin input.hlsl, invoked as openclaw execute shader-programming --subprocess "fxc /T vs_5_0 /E MainVS /Fo output.bin input.hlsl".
  • API endpoints: POST to OpenClaw's /api/shader/generate with JSON payload, e.g., curl -H "Authorization: Bearer $OPENCLAW_API_KEY" -d '{"lang": "glsl", "type": "fragment"}' https://api.openclaw.com/api/shader/generate.
  • Config formats: Use JSON for inputs, e.g., {"shader": {"version": "330", "precision": "highp float"}}. For error checks, include flags like --validate in commands, e.g., openclaw execute shader-programming --task validate --input "shader code" --flags "--validate".

Integration Notes

Integrate this skill by embedding generated shaders into your project workflow. For Unity, save GLSL/HLSL files in the Assets/Shaders directory and reference them in materials. In Unreal, use the.usf format for HLSL. Always wrap OpenClaw calls in a script, e.g., in Python: import subprocess; subprocess.run(["openclaw", "execute", "shader-programming", "--task", "generate", "--lang", "glsl"]). For cross-engine compatibility, specify profiles in configs (e.g., {"profile": "gles3"} for mobile). If using external tools, ensure $OPENCLAW_API_KEY is set for authenticated API calls to avoid failures.

Error Handling

Handle shader errors by parsing compiler output. For GLSL, check glslangValidator logs for patterns like "ERROR: 0:5: 'undeclared identifier'", then suggest fixes, e.g., add missing variables. In code: try {subprocess.run(["glslangValidator", "-V", "input.vert"])} catch e {print(e.stderr); if "syntax error" in e.stderr: return "Fix line 5 with correct syntax"}. For HLSL, fxc errors like "error X3004: undeclared identifier" require redeclaring variables. Use OpenClaw's built-in validation: openclaw execute shader-programming --task debug --input "shader code", which returns JSON like {"errors": ["Line 10: missing semicolon"]}. Always log errors with timestamps and retry with corrected inputs.

Concrete Usage Examples

  1. Generate a basic GLSL vertex shader for a simple 3D object: Use openclaw execute shader-programming --task generate --lang glsl --input '{"type": "vertex", "inputs": ["vec3 position"]}'. This produces: attribute vec3 aPosition; void main() {gl_Position = vec4(aPosition, 1.0);}
  2. Optimize an existing HLSL fragment shader for performance: Run openclaw execute shader-programming --task optimize --lang hlsl --input "float4 PSMain(float2 uv: TEXCOORD): SV_Target {return float4(uv, 0.0, 1.0);}". Output might be: float4 PSMain(float2 uv: TEXCOORD): SV_Target {return float4(uv.x, uv.y, 0.0, 1.0);} // Optimized by inlining.

Graph Relationships

  • Related to: game-dev cluster (e.g., shares nodes with graphics-programming for rendering pipelines).
  • Links to: graphics-programming (for broader API integration), rendering-engines (for engine-specific shader hooks), and performance-optimization (for shader tuning techniques).

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.33%
按下载量换算43

Claude

30.41%
按下载量换算38

Cursor

19.19%
按下载量换算24

Gemini CLI

10.15%
按下载量换算13

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/alphaonedev/openclaw-graph --skill shader-programming 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills