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

Grayscale PNG spritesheet causes blue tints to be ignored #1518

Closed
JeanMertz opened this issue Feb 25, 2021 · 2 comments
Closed

Grayscale PNG spritesheet causes blue tints to be ignored #1518

JeanMertz opened this issue Feb 25, 2021 · 2 comments
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

Comments

@JeanMertz
Copy link
Contributor

JeanMertz commented Feb 25, 2021

Bevy version

main (c2a427f)

Operating system & version

macOS 11.2.1

What you did

Load a Greyscale PNG spritesheet (via from_grid), set any colours with blue in them.

What you expected to happen

The blue tint should be applied.

What actually happened

Blue is ignored, producing inaccurate colour representations.

Additional information

Opening the png file and re-exporting it as an sRGB file solves the problem.

Original Spritesheet (white glyphs with transparent background)

Before

After

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

bjorn3 commented Feb 25, 2021

The original spritesheet shows as white on black for me. I don't see any blue tint. (using firefox for android)

@JeanMertz
Copy link
Contributor Author

The original spritesheet shows as white on black for me. I don't see any blue tint.

I probably should have been more clear in my issue description, but this is key:

Load a Greyscale PNG spritesheet (via from_grid), set any colours with blue in them.

The original sprite sheet is white (with a transparent background, not black), but when setting the color option on TextureAtlasSprite to a color with a blue tint, that tint is ignored.

It seems #1524 will fix this though 🎉

@bors bors bot closed this as completed in 6a0968b Mar 3, 2021
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants