Skip to content

rust-wiiu/gfd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GFD - Nintendo Wii U™ Shader 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 GFD (.gsh / .gtx). This crate enables easy parsing of the binary format into "Rust-native" structures (Vec & String instead of raw pointers).

This crate does not provide a shader compiler.

Usage

Cargo.toml

[dependencies]
gfd = { git = "https://github.com/rust-wiiu/gfd", tag = "v0.2.0" }

main.rs

use gfd::GFD;
use std::fs;

fn main() {
    let bytes = fs::read("shader.gsh").unwrap();
    let gfd = GFD::parse(&bytes).unwrap();
}

Sources

About

Parse GFD shader binaries.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages