{"record":{"id":"574dcb6c5ad210b1","repo":"bevyengine/bevy","slug":"could-load-texture-0","errorCode":null,"errorMessage":"Could load texture: {0}","messagePattern":"Could load texture: (.+?)","errorType":"exception","errorClass":"HdrTextureLoaderError","httpStatus":null,"severity":"error","filePath":"crates/bevy_image/src/hdr_texture_loader.rs","lineNumber":26,"sourceCode":"use wgpu_types::{Extent3d, TextureDimension, TextureFormat};\n\n/// Loads HDR textures as Texture assets\n#[derive(Clone, Default, TypePath)]\npub struct HdrTextureLoader;\n\n/// Settings for [`HdrTextureLoader`].\n#[derive(Serialize, Deserialize, Default, Debug)]\npub struct HdrTextureLoaderSettings {\n    /// Where the asset will be used - see the docs on [`RenderAssetUsages`] for details.\n    pub asset_usage: RenderAssetUsages,\n}\n\n/// Possible errors that can be produced by [`HdrTextureLoader`]\n#[non_exhaustive]\n#[derive(Debug, Error)]\npub enum HdrTextureLoaderError {\n    /// I/O Error.\n    #[error(\"Could load texture: {0}\")]\n    Io(#[from] std::io::Error),\n    /// Failed to decode the texture.\n    #[error(\"Could not extract image: {0}\")]\n    Image(#[from] image::ImageError),\n}\n\nimpl AssetLoader for HdrTextureLoader {\n    type Asset = Image;\n    type Settings = HdrTextureLoaderSettings;\n    type Error = HdrTextureLoaderError;\n    async fn load(\n        &self,\n        reader: &mut dyn Reader,\n        settings: &Self::Settings,\n        _load_context: &mut LoadContext<'_>,\n    ) -> Result<Image, Self::Error> {\n        let format = TextureFormat::Rgba32Float;\n        // `Rgba32Float` will always return a valid pixel size","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_image/src/hdr_texture_loader.rs#L8-L44","documentation":"HdrTextureLoaderError::Io: reading the HDR (.hdr/.pic) texture file from the asset source failed; the std::io::Error is forwarded. (Note the message typo 'Could load texture'.)","triggerScenarios":"Thrown at crates/bevy_image/src/hdr_texture_loader.rs:26 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the asset path and that the file exists in the asset source","Verify asset reader configuration / hot-reloading issues","Handle the LoadState::Failed result for this asset"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}