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

Use a pre-compiled shaderc #9

Closed
parasyte opened this issue Oct 14, 2019 · 1 comment
Closed

Use a pre-compiled shaderc #9

parasyte opened this issue Oct 14, 2019 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@parasyte
Copy link
Owner

Building pixels requires cmake, Python, and a bunch of non-rusty tools. It also makes the initial compilation take about 10 minutes on my recent laptop.

shaderc is one of the heaviest dependencies right now. There are a few "manual hacks" that you can try to link against a precompiled shaderc, but we need a real solution. See: https://github.com/google/shaderc-rs#setup

Until rust-gamedev/wg#23 comes to fruition, we might be able to patch shaderc-rs, but we would need a source of pre-compiled libs for all major platforms.

@parasyte parasyte added the help wanted Extra attention is needed label Oct 14, 2019
@parasyte
Copy link
Owner Author

I'm just going to go the simple route and pre-compile the shaders to SPIR-V, which will live in the repo alongside the shader source code. Any time the shaders need to be changed (I don't anticipate that happening often) they will need to be recompiled to SPIR-V out-of-band. E.g. cargo will not compile the shaders.

This removes a very large burden, so the tradeoff is worth it for right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant