Skip to content

Latest commit

 

History

58 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gfx2 - Nintendo Wii U™ Shader/Texture Binary Format

Unlike more modern graphics APIs the Nintendo Wii U does not have a online shader compiler, so the shaders have to be pre-compiled and embedded into the program or stored in the file system. The most common format for such shader binaries is Gfx2 (.gsh). This crate enables easy parsing of the binary format into "Rust-native" structures (Vec & String instead of raw pointers) and storing shaders in alternative data formats via serde.

Usage

cargo add gfx2

main.rs

use gfx2::Shader;
use std::fs;

fn main() {
    let bytes = fs::read("shader.gsh").unwrap();
    let gfx2 = Shader::from_gsh(&bytes).unwrap();
}

Sources

About

Parse Gfx2 shader binaries.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages