From ba5f85c74c7de0033871b1a04b51c61daecb84fc Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 9 Feb 2025 17:35:59 +0100 Subject: [PATCH] Fixed an issue where applying rounded corners caused rendering artfifacts if the texture did not use premultiplied alpha --- resources/shaders/glsl/core.glsl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/shaders/glsl/core.glsl b/resources/shaders/glsl/core.glsl index e5372a65d..669e6df3b 100644 --- a/resources/shaders/glsl/core.glsl +++ b/resources/shaders/glsl/core.glsl @@ -107,8 +107,10 @@ void main() else pixelValue = 1.0; - sampledColor.a *= pixelValue; - sampledColor.rgb *= pixelValue; + if (0x0u != (shaderFlags & 0x01u)) + sampledColor *= pixelValue; + else + sampledColor.a *= pixelValue; } }