wgsl_drill
: defines and bindings used by your WGSL shaders
#9891
nicopap
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a tool aimed at bevy contributors more than bevy users.
See the repo at: https://github.com/nicopap/wgsl_drill
With
wgsl_drill
, you can explore what bindings your shaders use in the bevy dialect ofwgsl
(naga oil).Following is a copy/paste of the README because why write it twice 🤷
How to use
Example:
Full description
How it works
It parses only a subset of the naga-oil WGSL dialect.
Notably:
#ifdef
,#else
,#define_import_path
,#import
CPP-like (C pre-processor)statements
group(x) binding(y)
attributesWe construct a rudimentary AST of all of those, and go through it, checking if
defines are available etc. We also read imports inline and conditionally.
Beta Was this translation helpful? Give feedback.
All reactions