Viewfinder
一个用于 Iris 的光影调试模组,适用于 Fabric。它提供了一个 MCP 服务器以及游戏内命令,供 AI 代理检查、测试并自动化光影开发工作流。
功能
- 光影重载与错误列表 - 触发光影重载并捕获编译错误
- 按需 GPU 性能分析 - 在固定的帧窗口内收集分层级的逐遍(per-pass)耗时数据,且不会带来永久性的查询开销
- 管线与程序检查 - 观察嵌套的 Iris 渲染遍次,并反映已链接程序的 Uniforms、UBOs 和 SSBOs
- 纹理转储 - 检查或导出主/备用 colortex、深度、阴影、噪声及自定义纹理
- SSBO 缓冲区转储 - 将着色器存储缓冲区对象(SSBO)转储到磁盘以供分析
- 截图调度 - 支持设置带有可配置帧延迟(用于 PT)的截图计划
- 修补后的着色器列表 - 通过列出所有着色器并搜索“errored”来以编程方式找出哪个修补后的着色器出错
- 交互式聊天输出 - 从聊天中复制路径、打开转储的文件,并插入后续命令
- 代理诊断快照 - 单个 JSON 负载包含 shaderpack、渲染信息、错误、指标、纹理、SSBOs 以及建议的下一步操作
- 受限的检查探针 - 在转储大型 GPU 资源之前,检查纹理统计信息/像素和 SSBO 字节预览
- 渲染遍次输出捕获 - 在选定的 Iris 渲染遍次结束时导出帧缓冲附件
- 着色器变异 - 编辑目录包源文件或选项,并使用结构化诊断信息进行重载
- 确定性场景 - 定位权威的单玩家玩家位置,设置时间/天气,并冻结或步进刻度(ticks)
安装
- 为 Minecraft 26.1 或 26.2 安装 Fabric Loader
- 安装 Fabric API 和 Iris(后者需要 Sodium)
- 将与你的 Minecraft 版本匹配的 Viewfinder
.jar放入mods/文件夹 - 如需进行 MCP 安装,请查看仓库。
用法
游戏内命令
所有命令均注册在 /viewfinder 下:
| 命令 | 描述 |
|---|---|
/viewfinder status |
显示当前 shaderpack 名称、错误数量和 MCP 地址 |
/viewfinder snapshot |
摘要代理诊断快照 |
/viewfinder reload |
重载着色器并报告任何编译错误 |
/viewfinder errors |
列出所有捕获的光影错误 |
/viewfinder errors all |
列出完整的捕获错误缓冲区 |
/viewfinder errors clear |
清除捕获的光影错误 |
/viewfinder screenshot [frames] |
截取屏幕截图(可选择延迟 N 帧) |
/viewfinder screenshot result |
显示最后一次截图的路径 |
/viewfinder metrics |
显示上次捕获的 GPU 耗时数据 |
/viewfinder metrics capture [frames] |
对接下来固定数量的帧进行性能分析 |
/viewfinder metrics reset |
清除收集的 GPU 耗时样本 |
/viewfinder ssbo list |
列出活动的 SSBO 缓冲区 |
/viewfinder ssbo inspect <index> [bytes] |
以十六进制、int、uint 和 float 值预览 SSBO 字节 |
/viewfinder ssbo dump <index> |
将 SSBO 缓冲区转储到 ssbo_dumps/ |
/viewfinder texture list |
列出可用的 colortex 和自定义纹理 |
/viewfinder texture inspect name <name> [samples] |
按名称探测纹理元数据、采样和通道统计信息 |
/viewfinder texture inspect id <id> [samples] |
按 GL ID 探测纹理元数据、采样和通道统计信息 |
/viewfinder texture sample name <name> <x> <y> [z] |
按名称读取特定的纹理像素 |
/viewfinder texture sample id <id> <x> <y> [z] |
按 GL ID 读取特定的纹理像素 |
/viewfinder texture dump name <name> [raw] |
按名称转储纹理(PNG 或原始格式) |
/viewfinder texture dump id <id> [raw] |
按 GL ID 转储纹理(PNG 或原始格式) |
/viewfinder patched_shaders |
列出 Iris 修补后的着色器文件 |
聊天输出使用可点击控件(在 Minecraft 支持的情况下):转储的文件路径可以打开或复制,列表输出包含转储命令的建议,捕获的错误包含用于复制完整消息和堆栈跟踪的按钮。
MCP 服务器
当 Minecraft 客户端启动时,Viewfinder 会自动在一个无状态的 Streamable HTTP MCP 服务器上启动服务,地址为:
http://127.0.0.1:7150/mcp
Viewfinder
A shader debugging mod for Iris on Fabric that exposes an MCP server and in-game commands for AI agents to inspect, test, and automate shader development workflows.
Features
- Shader reload and error list - trigger shader reloads and capture compilation errors
- On-demand GPU profiles - collect hierarchical per-pass timings over a fixed frame window without permanent query overhead
- Pipeline and program inspection - observe nested Iris passes and reflect linked program uniforms, UBOs, and SSBOs
- Texture dumping - inspect or export main/alternate colortex, depth, shadow, noise, and custom textures
- SSBO buffer dumping - dump shader storage buffer objects to disk for analysis
- Screenshot scheduling - schedule screenshots with configurable frame delay (for PT)
- Patched shader listing - find which patched shader errored programmatically by listing all and searching for "errored"
- Interactive chat output - copy paths, open dumped files, and insert follow-up commands from chat
- Agent diagnostics snapshot - one JSON payload with shaderpack, render, errors, metrics, textures, SSBOs, and suggested next actions
- Bounded inspection probes - inspect texture stats/pixels and SSBO byte previews before dumping large GPU resources
- Pass output capture - export framebuffer attachments at the end of a selected Iris pass
- Shader mutation - edit directory-pack sources or options and reload with structured diagnostics
- Deterministic scenes - position the authoritative singleplayer player, set time/weather, and freeze or step ticks
Installation
- Install Fabric Loader for Minecraft 26.1 or 26.2
- Install Fabric API and Iris (which requires Sodium)
- Drop the Viewfinder
.jarmatching your Minecraft version into yourmods/folder - For MCP installation, check the repo.
Usage
In-game commands
All commands are registered under /viewfinder:
| Command | Description |
|---|---|
/viewfinder status |
Show current shaderpack name, error count, and MCP address |
/viewfinder snapshot |
Summarize the agent diagnostics snapshot |
/viewfinder reload |
Reload shaders and report any compilation errors |
/viewfinder errors |
List all captured shader errors |
/viewfinder errors all |
List the full captured error buffer |
/viewfinder errors clear |
Clear captured shader errors |
/viewfinder screenshot [frames] |
Take a screenshot (optionally delayed by N frames) |
/viewfinder screenshot result |
Show the path of the last screenshot |
/viewfinder metrics |
Display the last captured GPU timings |
/viewfinder metrics capture [frames] |
Profile the next fixed number of frames |
/viewfinder metrics reset |
Clear collected GPU timing samples |
/viewfinder ssbo list |
List active SSBO buffers |
/viewfinder ssbo inspect <index> [bytes] |
Preview SSBO bytes as hex, int, uint, and float values |
/viewfinder ssbo dump <index> |
Dump an SSBO buffer to ssbo_dumps/ |
/viewfinder texture list |
List available colortex and custom textures |
/viewfinder texture inspect name <name> [samples] |
Probe texture metadata, samples, and channel statistics by name |
/viewfinder texture inspect id <id> [samples] |
Probe texture metadata, samples, and channel statistics by GL id |
/viewfinder texture sample name <name> <x> <y> [z] |
Read a specific texture pixel by name |
/viewfinder texture sample id <id> <x> <y> [z] |
Read a specific texture pixel by GL id |
/viewfinder texture dump name <name> [raw] |
Dump a texture by name (PNG or raw) |
/viewfinder texture dump id <id> [raw] |
Dump a texture by GL id (PNG or raw) |
/viewfinder patched_shaders |
List Iris patched shader files |
Chat output uses clickable controls where Minecraft supports them: dumped file paths can be opened or copied, list output includes dump command suggestions, and captured errors include copy buttons for full messages and stack traces.
MCP server
When the Minecraft client starts, Viewfinder automatically starts a stateless Streamable HTTP MCP server at:
http://127.0.0.1:7150/mcp
下载 Viewfinder
下载 Viewfinder
下载 Viewfinder
下载 Viewfinder
下载 Viewfinder
下载 Viewfinder
下载 Viewfinder
下载 Viewfinder
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧