Do you want to work on this issue?
You can request for a bounty in order to promote it!
Linear sRGB blending for layers #3385
Froyok posted onGitHub
Current issue: It seems that Tiled is doing color blending in sRGB gamma space and while this might be the expected behavior for a lot of users, it can cause quality issues (wrong/undesired color behaviors) and problems when trying to match the render of a game engine.
The issue mainly arise when blending layers together in the editor's viewport, when having semi-transparent pixels.
Describe the solution you'd like: Having an option to choose how to blend colors, via a simple boolean setting in the preferences to choose between Linear sRGB and sRGB, would be just enough. :smile:
There are plenty of resource on while blending colors this is better (for example this and this or this as well).
I would understand if this option would be off by default (and even limited to hardware acceleration mode) given that not all applications behave like this by default and to not break existing users workflows. For example Photoshop blends color in sRGB by default too but you can change that in the preferences.
Game engines like Unity or Unreal Engine, but also mine, on the other hand work in Linear sRGB color space and therefore the look in-editor cannot be 100% matched with the engine.
Example: The best and most obvious example is when trying to blend a pure red and green color together with a gradient as the mask. In sRGB this produce a darkening in the middle of the transition while in Linear sRGB we get the orange/yellow color.
Here is the gradient example with on the left my game engine and on the right Tiled's viewport:
Describe alternatives you've considered No alternative possible. This is a color management issue and cannot really be solved by a pipeline/workflow change on my side. Linear color blending is needed for other steps in my game engine (like bloom) and therefore sRGB blending is not possible.
Misc: I have looked around but it seems nobody requested this before, either here or on the forums. Also if anybody has technical questions, feel free to ask.