Closed
Description
Bevy version
- bevy 0.13.2
- cargo 1.77.1 (e52e36006 2024-03-26)
- windows 11
What you did
Loaded a known good .exr
from hdri-haven with AssetServer
.
What went wrong
2024-05-22T04:28:44.401424Z ERROR bevy_asset::server: Failed to load asset 'C:\Users\...\...exr' with asset loader 'bevy_render::texture::image_loader::ImageLoader': Could not load texture file: Error reading image file C:\Users\...\...exr: failed to load an image: The image format OpenExr is not supported, this is an error in `bevy_render`.
Additional info
Here's a minimal repro, you can download a sample .exr from Poly Haven
To test, run the application, and drag and drop the .exr into the window.
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Update, drag_and_drop_exr)
.run();
}
fn drag_and_drop_exr(
mut events: EventReader<FileDragAndDrop>,
asset_server: Res<AssetServer>,
) {
// Add the new entity
for event in events.read() {
let FileDragAndDrop::DroppedFile {
window: _,
path_buf: path,
} = event
else {
continue;
};
let Some(ext) = path.extension() else {
continue;
};
if ext != "exr" {
continue;
}
let _exr: Handle<Image> = asset_server.load(path.clone());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment