Shadow texcoords are normalized

Set texture width/height to 1.0, so that we see the shadow.
icc-effect-5.14.5
Martin Gräßlin 2011-03-30 20:31:36 +02:00
parent bd12134f05
commit 0667076fab
1 changed files with 4 additions and 0 deletions

View File

@ -680,6 +680,10 @@ void SceneOpenGL::Window::paintShadow(WindowQuadType type, const QRegion &region
texture->setWrapMode(GL_CLAMP_TO_EDGE);
texture->bind();
prepareStates(Shadow, data.opacity, data.brightness, data.saturation, data.shader, texture);
if (data.shader) {
data.shader->setUniform(GLShader::TextureWidth, 1.0f);
data.shader->setUniform(GLShader::TextureHeight, 1.0f);
}
renderQuads(0, region, quads);
restoreStates(Shadow, data.opacity, data.brightness, data.saturation, data.shader, texture);
texture->unbind();