-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
#[bindless]
in ExtendedMaterial
actually enable bindless mode.
I forgot to set `BINDLESS_SLOT_COUNT` in `ExtendedMaterial`'s implementation of `AsBindGroup`, so it didn't actually become bindless. In fact, it would usually crash with a shader/bind group layout mismatch, because some parts of Bevy's renderer thought that the resulting material was bindless while other parts didn't. This commit corrects the situation. I had to make `BINDLESS_SLOT_COUNT` a function instead of a constant because the `ExtendedMaterial` version needs some logic. Unfortunately, trait methods can't be `const fn`s, so it has to be a runtime function.
- Loading branch information
Showing
4 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters