-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
FallbackImage
only supports TextureDimension::D2
#6920
Comments
Thankfully it's not too hard to work around this by making the texture mandatory, and then the user can supply their own fallback. |
I've been having problems with this too, 3D textures for me. Like you said if not using I found it easiest to use If using the asset system I was tripped up by errors stating I was supplying a 2D image even though I was modifying the texture descriptor and view after the asset was created. Summary: +1 to finding a solution to this, as this took me quite some time to debug. |
I also tried fixing up my images after they were loaded by the asset server, and none of the system orderings that I tried worked. For me it was necessary to wait until the images had been loaded and modified before trying to spawn anything with those handles. |
Yes, in effect that's what I am doing too. I hold off on adding my custom material until it's loaded and modified. Because as soon as I do |
From looking at the Quoting the docs on
Assuming this holds for any This solution would require removing the I can take a swing at implementing this solution unless someone quickly yells at me that I should do something else ;) |
PR is ready for review! |
Bevy version
0.9
What you did
I tried to use the
AsBindGroup
derive for a custom material that uses optional array textures:What went wrong
The application crashed while trying to create the bind group. See full crash output below. The reason was:
Additional information
Theory of Root Cause
As the title suggests, I believe the root cause is that
FallbackImage
is only ever created withTextureDimension::D2
. So when I provideNone
for the optional image, the fallback has a mismatch with the expected texture binding layout.stdout/stderr + backtrace
The text was updated successfully, but these errors were encountered: