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

shaders macro: Expose top level GLSL constant #2580

Open
tnibler opened this issue Oct 17, 2024 · 0 comments
Open

shaders macro: Expose top level GLSL constant #2580

tnibler opened this issue Oct 17, 2024 · 0 comments

Comments

@tnibler
Copy link

tnibler commented Oct 17, 2024

It would be handy to have rust constants generated from GLSL constants (for example static array sizes, const uint MAX_FOOS = 32;), so you can assert at compile or runtime that your stuff and buffer sizes match up with what's declared in the shaders. I know they are already resolved and used for the types of struct array members, it's just sort of annoying to get at the sizes that way.

It's a small change but I couldn't figure out how the generated code for parsing and everything in 5 minutes, but I could look into it when I have more time.

Thanks :)

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

No branches or pull requests

2 participants