-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Clear color values are now explicitely sent to the rendering backend as-is. #2666
Conversation
…as-is. Previously, converting from Color32 to Rgba caused an srgb->linear conversion. This conversion is incorrect if the backbuffer doesn't perform automatic conversion from linear->srgb (lack of this conversion is generally what egui assumes!).
converted to draft, found an issue on web @ wgpu with this after all |
Was false alarm - the app ;) I tested with has a different eframe::App impl for web and native. Web had a similar background color but not the same. |
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.
good find!
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
Thanks for fixing the comments and explaining srgb-gamma again. We talked about this not too long ago 🤔 |
…as-is. (emilk#2666) * Clear color values are not explicitely sent to the rendering backend as-is. Previously, converting from Color32 to Rgba caused an srgb->linear conversion. This conversion is incorrect if the backbuffer doesn't perform automatic conversion from linear->srgb (lack of this conversion is generally what egui assumes!). * fill in pr numbers in changelog * Epi comment fix Co-authored-by: Emil Ernerfeldt <[email protected]> * Color32 comment fix Co-authored-by: Emil Ernerfeldt <[email protected]> * move changelog line * rename fix * use backticks in doc --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
Previously, converting from Color32 to Rgba caused an srgb->linear conversion. This conversion is incorrect if the backbuffer doesn't perform automatic conversion from linear->srgb (lack of this conversion is generally what egui assumes!).
Manually tested on Mac native & web both with glow & wgpu.
(although I only checked on the exact clear color with wgpu in native and web, but this should be pretty universal)