TextureFormat::R16Unorm support for Image (#5249)

# 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 https://github.com/bevyengine/bevy/pull/4124.
This commit is contained in:
Kurt Kühnert 2022-07-11 14:11:29 +00:00
parent 81bb4ef300
commit 8ea4a3decf

View file

@ -519,6 +519,7 @@ impl TextureFormatPixelInfo for TextureFormat {
| TextureFormat::R16Float
| TextureFormat::Rg16Uint
| TextureFormat::Rg16Sint
| TextureFormat::R16Unorm
| TextureFormat::Rg16Float
| TextureFormat::Rgba16Uint
| TextureFormat::Rgba16Sint
@ -552,6 +553,7 @@ impl TextureFormatPixelInfo for TextureFormat {
| TextureFormat::R8Sint
| TextureFormat::R16Uint
| TextureFormat::R16Sint
| TextureFormat::R16Unorm
| TextureFormat::R16Float
| TextureFormat::R32Uint
| TextureFormat::R32Sint