Skip to content

Commit 4f17cd9

Browse files
DGriffin91cart
authored andcommitted
Add support for Rgb9e5Ufloat textures (bevyengine#6781)
# Objective - Support textures in `Rgb9e5Ufloat` format. ## Solution - Add `TextureFormatPixelInfo` for `Rgb9e5Ufloat`. Tested this with a `Rgb9e5Ufloat` encoded KTX2 texture.
1 parent 93dc878 commit 4f17cd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/bevy_render/src/texture/image.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ impl TextureFormatPixelInfo for TextureFormat {
533533
| TextureFormat::Depth32Float => 4,
534534

535535
// special cases
536+
TextureFormat::Rgb9e5Ufloat => 4,
536537
TextureFormat::Rgb10a2Unorm => 4,
537538
TextureFormat::Rg11b10Float => 4,
538539
TextureFormat::Depth24Plus => 3, // FIXME is this correct?
@@ -581,7 +582,8 @@ impl TextureFormatPixelInfo for TextureFormat {
581582
| TextureFormat::Rgba32Float => 4,
582583

583584
// special cases
584-
TextureFormat::Rgb10a2Unorm
585+
TextureFormat::Rgb9e5Ufloat
586+
| TextureFormat::Rgb10a2Unorm
585587
| TextureFormat::Rg11b10Float
586588
| TextureFormat::Depth32Float
587589
| TextureFormat::Depth24Plus

0 commit comments

Comments
 (0)