summaryrefslogtreecommitdiff
path: root/gsk/resources
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-12-01 14:44:09 +0100
committerBenjamin Otte <otte@redhat.com>2017-12-02 16:21:58 +0100
commit9048d40bc233c1dd110233553e030c2223103ffb (patch)
tree64b718a1958be10e79561f5b8f346eb617471889 /gsk/resources
parentabc8d61730a657dc8640fc8d40c55d8859e74ae6 (diff)
downloadgtk+-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.spvbin8508 -> 8636 bytes
-rw-r--r--gsk/resources/vulkan/mask-clip.frag.spvbin1600 -> 1728 bytes
-rw-r--r--gsk/resources/vulkan/mask.frag2
-rw-r--r--gsk/resources/vulkan/mask.frag.spvbin1600 -> 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
index 0791cb599b..0e5fd97626 100644
--- a/gsk/resources/vulkan/mask-clip-rounded.frag.spv
+++ b/gsk/resources/vulkan/mask-clip-rounded.frag.spv
Binary files differ
diff --git a/gsk/resources/vulkan/mask-clip.frag.spv b/gsk/resources/vulkan/mask-clip.frag.spv
index 85fc5f01d5..5e321e2f28 100644
--- a/gsk/resources/vulkan/mask-clip.frag.spv
+++ b/gsk/resources/vulkan/mask-clip.frag.spv
Binary files differ
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
index 85fc5f01d5..5e321e2f28 100644
--- a/gsk/resources/vulkan/mask.frag.spv
+++ b/gsk/resources/vulkan/mask.frag.spv
Binary files differ