Naga Oil needs a CLI
jimblandy opened this issue · 1 comments
jimblandy commented
It would be nice if there were a command-line tool that would process shader templates into plain WGSL.
robtfm commented
i banged something together at https://github.com/robtfm/naga_oil_cli, let me know if it fits or if you need extra features etc.
it's not well tested but it works on bevy's pbr shader using something like cargo run -- -i ..\bevy\crates ..\bevy\crates\bevy_pbr\src\render\pbr.wgsl -d AVAILABLE_STORAGE_BUFFER_BINDINGS=16 -d MAX_CASCADES_PER_LIGHT=4 -d MAX_DIRECTIONAL_LIGHTS=10 -d VERTEX_OUTPUT_INSTANCE_INDEX -o bevy_pbr.wgsl