From 0667076fabb3cb9d1bc5ed31d264ccee8f7ad9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 30 Mar 2011 20:31:36 +0200 Subject: [PATCH] Shadow texcoords are normalized Set texture width/height to 1.0, so that we see the shadow. --- scene_opengl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 8b1e072085..0a79312b53 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -680,6 +680,10 @@ void SceneOpenGL::Window::paintShadow(WindowQuadType type, const QRegion ®ion 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();