Skip to content

Using linear sRGB blending for tint colors#4462

Open
Zomwolff wants to merge 1 commit into
mapeditor:masterfrom
Zomwolff:srgb-tint-blending
Open

Using linear sRGB blending for tint colors#4462
Zomwolff wants to merge 1 commit into
mapeditor:masterfrom
Zomwolff:srgb-tint-blending

Conversation

@Zomwolff
Copy link
Copy Markdown

Fixed the issue in #3385

Qpainter composites tint color in gamma-compressed sRGB state which results in a more darker/ unnatural looking tint.
This change adds a step in the process where we convert the image first to linear light and then back to sRGB state which ends up giving a more bright/natural looking tints.

The tiles at 50% occupation with no tint color (Initial state):
Screenshot 2026-03-24 150750

Previous version:
Screenshot 2026-03-24 145650

This version:
Screenshot 2026-03-24 150709

Qpainter previously used to blend colors in sRGB gamma space which
results in unnatural shading and muddy colors on tinted tiles.
To fix that we converted the image to linear light and then back to sRGB giving more natural colors.

Relates to mapeditor#3385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant