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

Investigate patching bevy to eliminate need for extra entrypoint injection #2

Closed
Shfty opened this issue Feb 28, 2023 · 1 comment
Closed

Comments

@Shfty
Copy link
Collaborator

Shfty commented Feb 28, 2023

Currently, NO_STORAGE_BUFFERS_SUPPORT, NO_TEXTURE_ARRAYS_SUPPORT and SIXTEEN_BYTE_ALIGNMENT are inaccessible to Material implementors through conventional methods; instead, the logic that drives them is replicated in crate::entry_point::rust_gpu_shader_defs and injected manually through the material.

This is not ideal, since changes to bevy's implementation would break it. It also introduces the need for a webgl flag on bevy-rust-gpu, which needs to be enabled manually by consuming crates.

In theory this should be fairly easy to move further up the render machinery chain, thus making those variables available to Material without a brittle workaround, so look into doing this and issuing a PR.

@Shfty
Copy link
Collaborator Author

Shfty commented Mar 8, 2023

Done. Upstream PR: bevy#7903

@Shfty Shfty closed this as completed Mar 8, 2023
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

1 participant