Skip to content

Commit

Permalink
bevy_render: Convert KTX2 R8G8B8_(SRGB|UNORM) to Rgba8Unorm(Srgb)
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump committed Apr 25, 2022
1 parent 99c4382 commit 70f0eca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/bevy_render/src/texture/ktx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,16 @@ pub fn ktx2_format_to_texture_format(
TextureFormat::Rg8Unorm
}
}
ktx2::Format::R8G8B8_UNORM => {
return Err(TextureError::FormatRequiresTranscodingError(
TranscodeFormat::Rgb8,
));
}
ktx2::Format::R8G8B8_SRGB => {
return Err(TextureError::FormatRequiresTranscodingError(
TranscodeFormat::Rgb8,
));
}
ktx2::Format::R8G8B8A8_UNORM => {
if is_srgb {
TextureFormat::Rgba8UnormSrgb
Expand Down

0 comments on commit 70f0eca

Please sign in to comment.