summaryrefslogtreecommitdiffstats
path: root/src/opengl/util/simple_porter_duff.glsl
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-14 15:22:57 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-14 15:42:52 (GMT)
commit33d2bd641fd031d1a4e38198bf50538344a4ccdb (patch)
tree1ebdd7a17b849e901863b2adcad7c10657d62147 /src/opengl/util/simple_porter_duff.glsl
parent111558d709d7d55318bdf3de99442f26e246fcdc (diff)
downloadQt-33d2bd641fd031d1a4e38198bf50538344a4ccdb.zip
Qt-33d2bd641fd031d1a4e38198bf50538344a4ccdb.tar.gz
Qt-33d2bd641fd031d1a4e38198bf50538344a4ccdb.tar.bz2
Cleaned up OpenGL1 paint engine GLSL code.
Fixed warnings about int->float and float->vecN conversions. Removed unused shader files. Reviewed-by: Trond
Diffstat (limited to 'src/opengl/util/simple_porter_duff.glsl')
-rw-r--r--src/opengl/util/simple_porter_duff.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/opengl/util/simple_porter_duff.glsl b/src/opengl/util/simple_porter_duff.glsl
index 83aef48..4cb0599 100644
--- a/src/opengl/util/simple_porter_duff.glsl
+++ b/src/opengl/util/simple_porter_duff.glsl
@@ -7,10 +7,10 @@ vec4 composite(vec4 src, vec4 dst)
result.xyz = porterduff_ab.x * src.xyz * dst.a
+ porterduff_ab.y * dst.xyz * src.a
- + porterduff_xyz.y * src.xyz * (1 - dst.a)
- + porterduff_xyz.z * dst.xyz * (1 - src.a);
+ + porterduff_xyz.y * src.xyz * (1.0 - dst.a)
+ + porterduff_xyz.z * dst.xyz * (1.0 - src.a);
- result.a = dot(porterduff_xyz, vec3(src.a * dst.a, src.a * (1 - dst.a), dst.a * (1 - src.a)));
+ result.a = dot(porterduff_xyz, vec3(src.a * dst.a, src.a * (1.0 - dst.a), dst.a * (1.0 - src.a)));
return result;
}