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
This commit is contained in:
Martin Gräßlin 2009-04-30 10:40:05 +00:00
parent 71766bae2e
commit 2a8fae3234
2 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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