Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naga Oil needs a CLI #70

Open
jimblandy opened this issue Dec 27, 2023 · 1 comment
Open

Naga Oil needs a CLI #70

jimblandy opened this issue Dec 27, 2023 · 1 comment

Comments

@jimblandy
Copy link

It would be nice if there were a command-line tool that would process shader templates into plain WGSL.

@robtfm
Copy link
Collaborator

robtfm commented Jan 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants