Pipelined texture atlas crashing with wrong texture view format #2929
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
P-Crash
A sudden unexpected crash
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
Bevy version
Pipelined-rendering branch, commit bf19ddf
Operating system & version
Windows 10
What you did
Using the pipelined_texture_example as an example, load a single image as a texture atlas from a grid.
Attempt to both draw the whole sheet, and a single item from the sheet, in following with the example.
What you expected to happen
Like the example, it should have drawn and not crashed.
What actually happened
The program crashed
Additional information
It looks like when loading an
Image
they're automatically assigned aTextureFormat
from the image format. But as far as I could tell, the sprite shader can only use a Texture in the right format.(The example works because the image is the correct format.)
I was able to get it to run successfully by modifying
image_to_texture
in image_texture_conversion.rs to convert all loaded images to rgba8.Edit: I checked, and the image from the example is loaded as
Rgba8UnormSrgb
.When converting the image to get it to work, I used this (copied from the original code, but converting the image first instead of matching) instead:
The text was updated successfully, but these errors were encountered: