-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Fix KTX2 R8_SRGB, R8_UNORM, R8G8_SRGB, R8G8_UNORM, R8G8B8_SRGB, R8G8B8_UNORM support #4594
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change looks OK but I can't test it
@superdump how does this PR relate to #5325? (And this needs rebasing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transcoding is lossy (unsurprisingly), supporting this is good though. if it ever results in banding near deep dark colors, dithering at the transcode step could be investigated
@alice-i-cecile it isn’t directly related. This is about supporting some uncompressed data formats. That other PR was rather about how to interpret the pieces of data (layers in array textures, faces in cubemap textures, both in cubemap array textures, and mip levels and whatever) to get them to wgpu buffers in the correct order without really caring about the format of the data itself. |
70f0eca
to
52461b4
Compare
bors r+ |
…8_UNORM support (#4594) # Objective - Fixes #4592 ## Solution - Implement `SrgbColorSpace` for `u8` via `f32` - Convert KTX2 R8 and R8G8 non-linear sRGB to wgpu `R8Unorm` and `Rg8Unorm` as non-linear sRGB are not supported by wgpu for these formats - Convert KTX2 R8G8B8 formats to `Rgba8Unorm` and `Rgba8UnormSrgb` by adding an alpha channel as the Rgb variants don't exist in wgpu --- ## Changelog - Added: Support for KTX2 `R8_SRGB`, `R8_UNORM`, `R8G8_SRGB`, `R8G8_UNORM`, `R8G8B8_SRGB`, `R8G8B8_UNORM` formats by converting to supported wgpu formats as appropriate
…8_UNORM support (bevyengine#4594) # Objective - Fixes bevyengine#4592 ## Solution - Implement `SrgbColorSpace` for `u8` via `f32` - Convert KTX2 R8 and R8G8 non-linear sRGB to wgpu `R8Unorm` and `Rg8Unorm` as non-linear sRGB are not supported by wgpu for these formats - Convert KTX2 R8G8B8 formats to `Rgba8Unorm` and `Rgba8UnormSrgb` by adding an alpha channel as the Rgb variants don't exist in wgpu --- ## Changelog - Added: Support for KTX2 `R8_SRGB`, `R8_UNORM`, `R8G8_SRGB`, `R8G8_UNORM`, `R8G8B8_SRGB`, `R8G8B8_UNORM` formats by converting to supported wgpu formats as appropriate
Objective
Solution
SrgbColorSpace
foru8
viaf32
R8Unorm
andRg8Unorm
as non-linear sRGB are not supported by wgpu for these formatsRgba8Unorm
andRgba8UnormSrgb
by adding an alpha channel as the Rgb variants don't exist in wgpuChangelog
R8_SRGB
,R8_UNORM
,R8G8_SRGB
,R8G8_UNORM
,R8G8B8_SRGB
,R8G8B8_UNORM
formats by converting to supported wgpu formats as appropriate