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.
Currently,
NO_STORAGE_BUFFERS_SUPPORT,NO_TEXTURE_ARRAYS_SUPPORTandSIXTEEN_BYTE_ALIGNMENTare inaccessible toMaterialimplementors through conventional methods; instead, the logic that drives them is replicated incrate::entry_point::rust_gpu_shader_defsand 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
webglflag onbevy-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
Materialwithout a brittle workaround, so look into doing this and issuing a PR.