An open API service indexing awesome lists of open source software.

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

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.