Skip to content

Commit

Permalink
TextureFormat::R16Unorm support for Image (bevyengine#5249)
Browse files Browse the repository at this point in the history
# Objective

Currently some TextureFormats are not supported by the Image type.
The `TextureFormat::R16Unorm` format is useful for storing heightmaps.
This small change would unblock releasing my terrain plugin on bevy 0.8.
 
## Solution

Added `TextureFormat::R16Unorm` support to Image.
This is an alternative (short term solution) to the large texture format issue bevyengine#4124.
  • Loading branch information
kurtkuehnert authored and inodentry committed Aug 8, 2022
1 parent 0a4a9ab commit 6db7fc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bevy_render/src/texture/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ impl TextureFormatPixelInfo for TextureFormat {
| TextureFormat::R16Float
| TextureFormat::Rg16Uint
| TextureFormat::Rg16Sint
| TextureFormat::R16Unorm
| TextureFormat::Rg16Float
| TextureFormat::Rgba16Uint
| TextureFormat::Rgba16Sint
Expand Down Expand Up @@ -552,6 +553,7 @@ impl TextureFormatPixelInfo for TextureFormat {
| TextureFormat::R8Sint
| TextureFormat::R16Uint
| TextureFormat::R16Sint
| TextureFormat::R16Unorm
| TextureFormat::R16Float
| TextureFormat::R32Uint
| TextureFormat::R32Sint
Expand Down

0 comments on commit 6db7fc3

Please sign in to comment.