Repository navigation
1.0.0
English | 简体中文
ShaderRipper 1.0.0
从 Unity 游戏数据中提取 Shader,重建为可读的 ShaderLab + CGPROGRAM。纯 C#,全资源内嵌,下载即用。
支持平台:d3d11(DXBC 汇编逐条直译 Cg)、GLES3 / GLES2 / OpenGLCore(GLSL 回译 Cg)、d3d9(自研反汇编)、D3D12(DXIL,经 dxcompiler);Metal / Vulkan 仅输出参考文件。全平台反汇编均可用(Windows / Linux)。
下载
| 文件 | 平台 | 说明 |
|---|---|---|
ShaderRipper.exe |
Windows x64 | 带 CLR 的裁剪单文件(39 MB) |
ShaderRipper |
Linux x64 | 同上,chmod +x 直接运行(56 MB) |
无任何伴生文件:schema、修复表、原生库已全部嵌入可执行文件。
使用
# 最简:指定游戏数据目录(含 resources.assets)
ShaderRipper.exe --data "游戏目录/游戏名_Data"
# 带逐指令反汇编注释
ShaderRipper.exe --data "游戏名_Data" --out 输出目录 --asm详细参数见 README(中文) / README (English)。
⚠️ 兼容性注意:IL2CPP + 仅 D3D 后端的游戏不友好
对 IL2CPP 打包、且只带 d3d9 / d3d11 / d3d12 图形后端 的游戏(Steam 单机大作多为此类),本工具的输出会很受限:
- d3d9 / d3d12:只输出反汇编,不回译 CGPROGRAM
- d3d11:能重建 Cg,但 DXBC 汇编直译的可读性远不如作者源码,且丢失 HLSLcc 级别的结构信息
- 如果游戏连 GLES3 / OpenGLCore 后端都没打包,就没有 GLSL 可回译,基本只能拿到汇编
想获得更好的可读产物,请优先找带 GLES3 / OpenGLCore 后端的游戏数据(移动版、部分 Steam 版的 bundle 里常有)。
English
Extract Shaders from Unity game data and rebuild them as readable ShaderLab + CGPROGRAM. Pure C#, all resources embedded, ready to run.
Supported platforms: d3d11 (instruction-by-instruction DXBC→Cg translation), GLES3 / GLES2 / OpenGLCore (GLSL back-translation), d3d9 (self-contained disassembler), D3D12 (DXIL via dxcompiler); Metal / Vulkan are exported as reference files. All disassembly paths work on Windows and Linux.
Downloads
| File | Platform | Notes |
|---|---|---|
ShaderRipper.exe |
Windows x64 | Trimmed single-file with CLR host (39 MB) |
ShaderRipper |
Linux x64 | Same, run chmod +x (56 MB) |
No companion files needed: schemas, fix-up tables and native libraries are all embedded in the executable.
Usage
ShaderRipper.exe --data "GameDir/Game_Data"
ShaderRipper.exe --data "Game_Data" --out out_dir --asmSee the README for the full CLI reference.
⚠️ Compatibility: unfriendly to IL2CPP games shipping only D3D backends
For games packed with IL2CPP that only ship d3d9 / d3d11 / d3d12 graphics backends (typical for Steam titles), output is limited:
- d3d9 / d3d12: disassembly only, no CGPROGRAM reconstruction
- d3d11: Cg is rebuilt, but as a direct translation of DXBC assembly — far less readable than original source
- If the game ships no GLES3 / OpenGLCore backend at all, there is no GLSL to back-translate, so assembly is mostly all you get
For more readable output, prefer game data that includes GLES3 / OpenGLCore backends (mobile builds, or bundles in some Steam releases).
Full Changelog: https://github.com/StArraySharp/ShaderRipper/commits/1.0.0