https://github.com/dcnick3/shader-compiler-rs
A tool to recompile binary maxwell shaders (found on nintendo switch) to glsl
https://github.com/dcnick3/shader-compiler-rs
nvn recompilation reverse-engineering shaders
Last synced: about 1 year ago
JSON representation
A tool to recompile binary maxwell shaders (found on nintendo switch) to glsl
- Host: GitHub
- URL: https://github.com/dcnick3/shader-compiler-rs
- Owner: DCNick3
- License: mpl-2.0
- Created: 2023-03-03T18:11:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T16:57:16.000Z (almost 3 years ago)
- Last Synced: 2025-01-28T03:29:50.909Z (over 1 year ago)
- Topics: nvn, recompilation, reverse-engineering, shaders
- Language: C++
- Homepage:
- Size: 2.24 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## shader-compiler-rs
A thin wrapper around the Hades - Yuzu Shader Recompiler, which allows to recompile binary NVN shaders into GLSL, found in many Nintendo Switch games.
## Installation & Usage
Install with:
```bash
git clone https://github.com/DCNick3/shader-compiler-rs
cd shader-compiler-rs
cargo install --path cli
```
Usage:
```bash
shader-compiler-cli shader.bin shader.glsl
```
`shader.bin` is the data part of the shader you pass to NVN. Note, that, unlike the [Ryujinx ShaderTools](https://github.com/Ryujinx/Ryujinx/tree/master/Ryujinx.ShaderTools), this tool accepts shaders with the 0x30-bytes NVN-specific header before the [SPH](https://download.nvidia.com/open-gpu-doc/Shader-Program-Header/1/Shader-Program-Header.html).
`shader.glsl` is the output file. It will be overwritten if it already exists.
## Thanks
A big thanks to the [yuzu](https://github.com/yuzu-emu/yuzu) contributors for their work on the shader recompiler, which is used in this tool.
Also, personal thanks to ByLaws and Pharynx on the ReSwitched Discord for patiently answering my questions =)
## License
Same as the skyline's fork of Yuzu Shader Recompiler (Hades), this tool is licensed under the MPL-2.0 license.