From 4f17cd97546380889283ff39e6fdf9dba360bf02 Mon Sep 17 00:00:00 2001 From: Griffin Date: Mon, 28 Nov 2022 14:14:08 +0000 Subject: [PATCH] Add support for Rgb9e5Ufloat textures (#6781) # Objective - Support textures in `Rgb9e5Ufloat` format. ## Solution - Add `TextureFormatPixelInfo` for `Rgb9e5Ufloat`. Tested this with a `Rgb9e5Ufloat` encoded KTX2 texture. --- crates/bevy_render/src/texture/image.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/bevy_render/src/texture/image.rs b/crates/bevy_render/src/texture/image.rs index 1562d887e0404..69340449744ed 100644 --- a/crates/bevy_render/src/texture/image.rs +++ b/crates/bevy_render/src/texture/image.rs @@ -533,6 +533,7 @@ impl TextureFormatPixelInfo for TextureFormat { | TextureFormat::Depth32Float => 4, // special cases + TextureFormat::Rgb9e5Ufloat => 4, TextureFormat::Rgb10a2Unorm => 4, TextureFormat::Rg11b10Float => 4, TextureFormat::Depth24Plus => 3, // FIXME is this correct? @@ -581,7 +582,8 @@ impl TextureFormatPixelInfo for TextureFormat { | TextureFormat::Rgba32Float => 4, // special cases - TextureFormat::Rgb10a2Unorm + TextureFormat::Rgb9e5Ufloat + | TextureFormat::Rgb10a2Unorm | TextureFormat::Rg11b10Float | TextureFormat::Depth32Float | TextureFormat::Depth24Plus