diff options
author | Benjamin Otte <otte@redhat.com> | 2017-12-01 14:44:09 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-12-02 16:21:58 +0100 |
commit | 9048d40bc233c1dd110233553e030c2223103ffb (patch) | |
tree | 64b718a1958be10e79561f5b8f346eb617471889 /gsk/resources | |
parent | abc8d61730a657dc8640fc8d40c55d8859e74ae6 (diff) | |
download | gtk+-9048d40bc233c1dd110233553e030c2223103ffb.tar.gz |
vulkan: Fix mask shader to premultiply color
The inColor wasn't premultiplied, so the resulting colors were wrong
with translucent borders.
Diffstat (limited to 'gsk/resources')
-rw-r--r-- | gsk/resources/vulkan/mask-clip-rounded.frag.spv | bin | 8508 -> 8636 bytes | |||
-rw-r--r-- | gsk/resources/vulkan/mask-clip.frag.spv | bin | 1600 -> 1728 bytes | |||
-rw-r--r-- | gsk/resources/vulkan/mask.frag | 2 | ||||
-rw-r--r-- | gsk/resources/vulkan/mask.frag.spv | bin | 1600 -> 1728 bytes |
4 files changed, 1 insertions, 1 deletions
diff --git a/gsk/resources/vulkan/mask-clip-rounded.frag.spv b/gsk/resources/vulkan/mask-clip-rounded.frag.spv Binary files differindex 0791cb599b..0e5fd97626 100644 --- a/gsk/resources/vulkan/mask-clip-rounded.frag.spv +++ b/gsk/resources/vulkan/mask-clip-rounded.frag.spv diff --git a/gsk/resources/vulkan/mask-clip.frag.spv b/gsk/resources/vulkan/mask-clip.frag.spv Binary files differindex 85fc5f01d5..5e321e2f28 100644 --- a/gsk/resources/vulkan/mask-clip.frag.spv +++ b/gsk/resources/vulkan/mask-clip.frag.spv diff --git a/gsk/resources/vulkan/mask.frag b/gsk/resources/vulkan/mask.frag index f713371bc6..81f6833ef2 100644 --- a/gsk/resources/vulkan/mask.frag +++ b/gsk/resources/vulkan/mask.frag @@ -12,5 +12,5 @@ layout(location = 0) out vec4 color; void main() { - color = clip (inPos, vec4(inColor.rgb, texture(inTexture, inTexCoord).a)); + color = clip (inPos, vec4(inColor.rgb * inColor.a, inColor.a) * texture(inTexture, inTexCoord).a); } diff --git a/gsk/resources/vulkan/mask.frag.spv b/gsk/resources/vulkan/mask.frag.spv Binary files differindex 85fc5f01d5..5e321e2f28 100644 --- a/gsk/resources/vulkan/mask.frag.spv +++ b/gsk/resources/vulkan/mask.frag.spv |