From 2a8fae3234abe79e69569eafe8d919761f83d944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 30 Apr 2009 10:40:05 +0000 Subject: [PATCH] Rename uniforms textureWidth and textureHeight to blurTextureWidth/Height in blur effect as those uniforms are used on global scale now. svn path=/trunk/KDE/kdebase/workspace/; revision=961554 --- effects/blur/blur.cpp | 4 ++-- effects/blur/data/blur-render.frag | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index 99af64ec88..3b3610e124 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -112,8 +112,8 @@ bool BlurEffect::loadData() mWindowShader->bind(); mWindowShader->setUniform("windowTex", 0); mWindowShader->setUniform("backgroundTex", 4); - mWindowShader->setUniform("textureWidth", (float)texw); - mWindowShader->setUniform("textureHeight", (float)texh); + mWindowShader->setUniform("blurTextureWidth", (float)texw); + mWindowShader->setUniform("blurTextureHeight", (float)texh); mWindowShader->unbind(); return true; diff --git a/effects/blur/data/blur-render.frag b/effects/blur/data/blur-render.frag index 740f48149f..bf73f00ae7 100644 --- a/effects/blur/data/blur-render.frag +++ b/effects/blur/data/blur-render.frag @@ -1,7 +1,7 @@ uniform sampler2D windowTex; uniform sampler2D backgroundTex; -uniform float textureWidth; -uniform float textureHeight; +uniform float blurTextureWidth; +uniform float blurTextureHeight; uniform float opacity; uniform float saturation; uniform float brightness; @@ -10,7 +10,7 @@ uniform float brightness; // Converts pixel coordinates to texture coordinates vec2 pix2tex(vec2 pix) { - return vec2(pix.x / textureWidth, pix.y / textureHeight); + return vec2(pix.x / blurTextureWidth, pix.y / blurTextureHeight); } // Returns color of the window at given texture coordinate, taking into