-
I'm in the process of upgrading our RmlUi integration to 6.0 and struggle a bit with the premultipied alpha requirement. We now have a couple of options and I was wondering what the best option would be:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Oh, good question. Yeah, generally, for our own backends I figured that things look better when not doing gamma correct blending. Maybe it's just because web browsers do it this way, so that's what we're used to. By the way, here's an excellent stack overflow post comparing different methods for color interpolation. I would say both sRGB and linearized sRGB both have their quirks, I don't think there is a clear winner at least when it comes to that. So this was part of the reason that I've simply assumed (at least for our backends) that we do everything directly in sRGB. In OpenGL in particular, it's quite simple to just disable the sRGB conversion completely: RmlUi/Backends/RmlUi_Renderer_GL3.cpp Lines 872 to 873 in 7a8acea So I would say just stick to conventions here, and do number 1. |
Beta Was this translation helpful? Give feedback.
Oh, good question. Yeah, generally, for our own backends I figured that things look better when not doing gamma correct blending. Maybe it's just because web browsers do it this way, so that's what we're used to. By the way, here's an excellent stack overflow post comparing different methods for color interpolation. I would say both sRGB and linearized sRGB both have their quirks, I don't think there is a clear winner at least when it comes to that.
So this was part of the reason that I've simply assumed (at least for our backends) that we do everything directly in sRGB. In OpenGL in particular, it's quite simple to just disable the sRGB conversion completely:
RmlUi/Backends/RmlUi_Rend…