summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-08-28 13:48:32 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-08-31 10:26:28 (GMT)
commitf1d8ae975f1979c17509aa56785a1d663e145215 (patch)
treed8de15ca1eb76fcbe5e031f16492a8504a4736f5 /examples
parentf8f5cef2069c105d0d11a795105afd3f4519acf1 (diff)
downloadQt-f1d8ae975f1979c17509aa56785a1d663e145215.zip
Qt-f1d8ae975f1979c17509aa56785a1d663e145215.tar.gz
Qt-f1d8ae975f1979c17509aa56785a1d663e145215.tar.bz2
Fixed custom shader example to correctly use premultiplied colors.
Reviewed-by: Gunnar
Diffstat (limited to 'examples')
-rw-r--r--examples/effects/customshader/customshadereffect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/effects/customshader/customshadereffect.cpp b/examples/effects/customshader/customshadereffect.cpp
index 69fdb15..c5ac3e3 100644
--- a/examples/effects/customshader/customshadereffect.cpp
+++ b/examples/effects/customshader/customshadereffect.cpp
@@ -48,7 +48,7 @@ static char const colorizeShaderCode[] =
" vec4 src = texture2D(imageTexture, textureCoords);\n"
" float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n"
" vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n"
- " return vec4(colorize.rgb, src.a);\n"
+ " return vec4(colorize.rgb * src.a, src.a);\n"
"}";
CustomShaderEffect::CustomShaderEffect()