Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

BigWingBeat
Copy link
Contributor

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

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen A-Assets Load files from disk to use for things like images, models, and sounds labels Dec 2, 2022
Copy link
Member

@alice-i-cecile alice-i-cecile left a 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!

@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Dec 2, 2022
@DGriffin91
Copy link
Contributor

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.

@alice-i-cecile alice-i-cecile added the M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Dec 3, 2022
@alice-i-cecile
Copy link
Member

Breaking change label added to make sure this is picked up in the migration guide :) Good call out @DGriffin91

@james7132 james7132 added this to the 0.10 milestone Dec 4, 2022
Copy link
Contributor

@superdump superdump left a 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+

bors bot pushed a commit that referenced this pull request Dec 4, 2022
# 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
@bors bors bot changed the title Intepret glTF colors as linear instead of sRGB [Merged by Bors] - Intepret glTF colors as linear instead of sRGB Dec 4, 2022
@bors bors bot closed this Dec 4, 2022
ickshonpe pushed a commit to ickshonpe/bevy that referenced this pull request Dec 6, 2022
# 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
alradish pushed a commit to alradish/bevy that referenced this pull request Jan 22, 2023
# 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
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# 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
@BigWingBeat BigWingBeat deleted the gltf-colorspace-fix branch August 30, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

glTF scene loader uses wrong color space
6 participants