summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Loup A. Griffais <pgriffais@nvidia.com>2011-10-16 07:41:40 (GMT)
committerMartin Gräßlin <mgraesslin@kde.org>2011-10-26 17:23:55 (GMT)
commitc10419b6f85af4a6d2c7539c594abc7224535c03 (patch)
treee5eaee68ed9204466f94cf47c744a33b382d3d70
parentf0d8fce3450935c773dc49f70a232f53436eef36 (diff)
kwin-gles: save a branch in the main shader
On less flexible hardware, one instruction for one branch might not be a good trade. REVIEW: 102886
-rw-r--r--kwin/scene-fragment.glsl4
1 files changed, 1 insertions, 3 deletions
diff --git a/kwin/scene-fragment.glsl b/kwin/scene-fragment.glsl
index 8122991..a7b19a3 100644
--- a/kwin/scene-fragment.glsl
+++ b/kwin/scene-fragment.glsl
@@ -11,9 +11,7 @@ varying vec2 varyingTexCoords;
void main() {
vec4 tex = texture2D(sampler, varyingTexCoords);
- if (u_forceAlpha > 0) {
- tex.a = 1.0;
- }
+ tex.a += float(u_forceAlpha);
if( saturation != 1.0 ) {
vec3 desaturated = tex.rgb * vec3( 0.30, 0.59, 0.11 );