Skip to content

Commit

Permalink
Add support for Rgb9e5Ufloat textures (bevyengine#6781)
Browse files Browse the repository at this point in the history
# Objective

- Support textures in `Rgb9e5Ufloat` format.

## Solution

- Add `TextureFormatPixelInfo` for `Rgb9e5Ufloat`.

Tested this with a `Rgb9e5Ufloat` encoded KTX2 texture.
  • Loading branch information
DGriffin91 authored and cart committed Nov 30, 2022
1 parent 93dc878 commit 4f17cd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_render/src/texture/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4f17cd9

Please sign in to comment.