[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] krita/data/shaders: Fix High-Quality filtering for some broken ATI cards
From: Dmitry Kazakov <dimula73 () gmail ! com>
Date: 2013-12-25 16:06:20
Message-ID: E1VvqyS-00054D-NY () scm ! kde ! org
[Download RAW message or body]
Git commit c6c19a858166db0fdb52eb14c75b2546eab8a132 by Dmitry Kazakov.
Committed on 25/12/2013 at 16:05.
Pushed by dkazakov into branch 'master'.
Fix High-Quality filtering for some broken ATI cards
Some (broken) ATI drivers need the arithmetic operands to be
casted manually. So let's make them happy.
http://hub.jmonkeyengine.org/forum/topic/shader-set-uniform-failing-70-of-the-time/
The patch is prepared by: Paul Geraskin <paulgeraskin@gmail.com>
M +3 -3 krita/data/shaders/highq_downscale.frag
http://commits.kde.org/calligra/c6c19a858166db0fdb52eb14c75b2546eab8a132
diff --git a/krita/data/shaders/highq_downscale.frag b/krita/data/shaders/highq_downscale.frag
index b260337..37c91c6 100644
--- a/krita/data/shaders/highq_downscale.frag
+++ b/krita/data/shaders/highq_downscale.frag
@@ -51,14 +51,14 @@ vec4 filterPureLinear8(sampler2D texture, vec2 texcoord)
vec4 p1 = textureLod(texture, vec2(texcoord.x - offset, texcoord.y - offset), level);
vec4 p2 = textureLod(texture, vec2(texcoord.x + offset, texcoord.y - offset), level);
- vec4 p3 = 4.0*textureLod(texture, vec2(texcoord.x, texcoord.y), level);
+ vec4 p3 = vec4(4.0) * textureLod(texture, vec2(texcoord.x, texcoord.y), level);
vec4 p4 = textureLod(texture, vec2(texcoord.x - offset, texcoord.y + offset), level);
vec4 p5 = textureLod(texture, vec2(texcoord.x + offset, texcoord.y + offset), level);
- vec4 p6 = 3.0 * textureLod(texture, vec2(texcoord.x, texcoord.y), level + 1.0);
+ vec4 p6 = vec4(3.0) * textureLod(texture, vec2(texcoord.x, texcoord.y), level + 1.0);
- return (p1 + p2 + p3 + p4 + p5 + p6) / 11.0;
+ return (p1 + p2 + p3 + p4 + p5 + p6) / vec4(11.0);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic