-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
[Merged by Bors] - Intepret glTF colors as linear instead of sRGB #6828
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.
I agree with you on what the spec says, and the folks over at blender were very helpful!
Good catch! I noticed this during the last game jam but then completely forgot about it. I think it would be good to make sure that a change like this has really good discoverability in the migration guide as it will totally change the look of any GLTF assets that use colors. This could be really unexpected and confusing for people since they would have already authored art excepting colors to look a certain way. Unfortunately without the proper asset pipeline features, this could be difficult for users to programmatically correct. Hopefully that asset features are in place for 0.10 that can make this type of fix easy to deal with. |
Breaking change label added to make sure this is picked up in the migration guide :) Good call out @DGriffin91 |
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.
From all that I’ve seen this sounds like the correct change to make.
bors r+
# Objective Fixes #6827 ## Solution Use the `Color::rgba_linear` function instead of the `Color::rgba` function to correctly interpret colors from glTF files in the linear color space rather than the incorrect sRGB color space
# Objective Fixes bevyengine#6827 ## Solution Use the `Color::rgba_linear` function instead of the `Color::rgba` function to correctly interpret colors from glTF files in the linear color space rather than the incorrect sRGB color space
# Objective Fixes bevyengine#6827 ## Solution Use the `Color::rgba_linear` function instead of the `Color::rgba` function to correctly interpret colors from glTF files in the linear color space rather than the incorrect sRGB color space
# Objective Fixes bevyengine#6827 ## Solution Use the `Color::rgba_linear` function instead of the `Color::rgba` function to correctly interpret colors from glTF files in the linear color space rather than the incorrect sRGB color space
Objective
Fixes #6827
Solution
Use the
Color::rgba_linear
function instead of theColor::rgba
function to correctly interpret colors from glTF files in the linear color space rather than the incorrect sRGB color space