GLSL着色器开发服务器

一个为GLSL着色器开发提供全面支持的MCP服务器,特别适用于React Three Fiber项目。

  • by kris-sorensen
  • Python
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 kris-sorensen/glsl-docs-mcp-server

使用说明

GLSL文档MCP服务器

使用React Three Fiber开发GLSL着色器的综合MCP服务器。

特性

  • GLSL基础:《着色器之书》,OpenGL.org,Khronos OpenGL
  • R3F实施:Maxime Heckel向导、Shadertoy转换、Codrops效果
  • 粒子系统:GPU粒子、FBO技术、基于曲线的效果

安装

先决条件

  • Python 3.10+
  • 克劳德代码或克劳德桌面

设置

git clone https://github.com/yourusername/glsl-docs-mcp.git
cd glsl-docs-mcp
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

配置

克劳德代码,添加到 ~/.claude.json:

{
  "mcpServers": {
    "glsl_docs": {
      "command": "/path/to/glsl-docs-mcp/run_server.sh",
      "args": []
    }
  }
}

适用于克劳德桌面,添加到配置文件:

{
  "mcpServers": {
    "glsl_docs": {
      "command": "python",
      "args": ["/path/to/glsl-docs-mcp/server.py"]
    }
  }
}

用法

  • search_glsl_fundamentals("uniforms") -GLSL基础和理论
  • search_r3f_shader_setup("shaderMaterial") -R3F实施
  • search_particle_shaders("gpu particles") -粒子系统
  • search_threejs_material_modification("onBeforeCompile") -先进材料修补
  • get_all_shader_resources() -完整的资源列表

文档来源

GLSL基础

  1. 《阴影之书》 - https://thebookofshaders.com/
  2. OpenGL.org - https://www.opengl.org/
  3. Khronos OpenGL - https://www.khronos.org/opengl/
  4. WebGL基础 - https://webglfundamentals.org/webgl/lessons/webgl-shaders-and-glsl.html
  5. Three.js手册-着色器 - https://threejs.org/manual/#en/shaders

R3F实施

  1. 马克西姆·赫克尔R3F指南 -完成着色器设置教程
  2. 从FrontDev遮阳板到R3F -转换工作流程
  3. Three.js手册-Shadertoy - https://threejs.org/manual/#en/shadertoy
  4. Codrops揭示效果 -实用着色器效果

粒子系统

  1. FrontDev GPU粒子 -粒子基础
  2. Maxime Heckel高级粒子 -FBO技术
  3. FrontDev曲线粒子 -足迹效应

高级Three.js材料修改

  1. Dusan Bosnjak-用GLSL扩展材料 -权威的onBeforeCompile指南
  2. Three.js之旅-改性材料 -综合材料修改课
  3. Codrops-魔法大理石 -实践onBefore编译示例
  4. Three.js ShaderChunk源代码 -所有着色器块定义
  5. Three.js ShaderLib源代码 -内置材质着色器程序
  6. Three.js UniformsLib源代码 -统一定义
  7. Three.js UniformsTils文档 -统一实用程序API
  8. 官方修改材料示例 -现场演示

共计:22个综合文件来源

贡献

要添加新的文档源,请执行以下操作:

  1. 将网站添加到 DOCS_SITES 在……里面 server.py
  2. 创建/更新相关搜索功能
  3. 测试新内容
  4. 提交拉取请求

许可证

MIT许可证