Swoorup / wgsl-bindgen

Generate typesafe Rust bindings for wgsl shaders in wgpu
https://crates.io/crates/wgsl_bindgen
MIT License
33 stars 6 forks source link

Wire up wgsl_minifier as an option. #7

Open Swoorup opened 7 months ago

Swoorup commented 7 months ago

There is an hastily written code here to convert naga module to strings, which contains wgsl_minifier.

It should be wired up as a WgslBindgenOption instead. Currently the problem is for naga_oil we output a single generated wgsl for embedded source option. Unfortunately some features like pipeline constants aren't supported when writing the wgsl by naga.