|
Apologies, I'm new to rust, bevy and I've not used ktx2 before! Not sure if this is a bug or not, so posting here. I'm trying to generate and load a ktx2 array texture with mipmaps. I've generated a file using the However when I try to load it, I get the following error from bevy:
What exactly does this mean in this context? Is this type of texture unsupported? Offending ktx2 file: texture.zip |
Replies: 1 comment 1 reply
|
I was able to resolve the issue. The reason for the error was that I was using the following code for loading: let texture_handle: Handle<Image> = asset_server.load(
"texture.ktx2",
|settings: &mut ImageLoaderSettings| {
settings.array_layout = Some(ImageArrayLayout::RowCount {
rows: 256,
})
}
);I lifted this pattern directly from the array texture example here, and thought that it would work with ktx2 textures as well (the example uses a png). However it seems this method is intended specifically for loading 2d images as array textures, rather than GPU friendly formats like ktx2 or dds which seem to handle arrays more natively. Just removing the
|
I was able to resolve the issue. The reason for the error was that I was using the following code for loading:
I lifted this pattern directly from the array texture example here, and thought that it would work with ktx2 textures as well (the example uses a png).
However it seems this method is intended specifically for loading 2d images as array textures, rather than GPU friendly formats like ktx2 or dds which seem to handle arrays more natively.
Just removing the
I…