[gtk+] Avoid super-luminous pixels
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid super-luminous pixels
- Date: Thu, 19 Oct 2017 13:17:07 +0000 (UTC)
commit b564dd853c52c3a2e3e1fd35a4f951cb128c0641
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 19 15:15:13 2017 +0200
Avoid super-luminous pixels
The color-matrix shader was creating pixels with r,g,b > a in
some cases, which leads to unexpected test failures. In particular
this as visible the opacity render node test for opacity 0.
.../vulkan/color-matrix-clip-rounded.frag.spv | Bin 9676 -> 9568 bytes
gsk/resources/vulkan/color-matrix-clip.frag.spv | Bin 2824 -> 2716 bytes
gsk/resources/vulkan/color-matrix.frag | 3 +--
gsk/resources/vulkan/color-matrix.frag.spv | Bin 2824 -> 2716 bytes
4 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv
b/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv
index 2025e85..d25714e 100644
Binary files a/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv and
b/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv differ
diff --git a/gsk/resources/vulkan/color-matrix-clip.frag.spv b/gsk/resources/vulkan/color-matrix-clip.frag.spv
index ec29f26..a9bd797 100644
Binary files a/gsk/resources/vulkan/color-matrix-clip.frag.spv and
b/gsk/resources/vulkan/color-matrix-clip.frag.spv differ
diff --git a/gsk/resources/vulkan/color-matrix.frag b/gsk/resources/vulkan/color-matrix.frag
index 00b7947..8787eb4 100644
--- a/gsk/resources/vulkan/color-matrix.frag
+++ b/gsk/resources/vulkan/color-matrix.frag
@@ -22,8 +22,7 @@ color_matrix (vec4 color, mat4 color_matrix, vec4 color_offset)
color = clamp(color, 0.0, 1.0);
/* premultiply */
- if (color.a != 0.0)
- color.rgb *= color.a;
+ color.rgb *= color.a;
return color;
}
diff --git a/gsk/resources/vulkan/color-matrix.frag.spv b/gsk/resources/vulkan/color-matrix.frag.spv
index ec29f26..a9bd797 100644
Binary files a/gsk/resources/vulkan/color-matrix.frag.spv and b/gsk/resources/vulkan/color-matrix.frag.spv
differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]