diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -126,15 +126,15 @@ m_renderTextures.reserve(m_downSampleIterations + 2); for (int i = 0; i <= m_downSampleIterations; i++) { - m_renderTextures.append(GLTexture(GL_RGBA8, effects->virtualScreenSize() / (1 << i))); + m_renderTextures.append(GLTexture(GL_SRGB8_ALPHA8, effects->virtualScreenSize() / (1 << i))); m_renderTextures.last().setFilter(GL_LINEAR); m_renderTextures.last().setWrapMode(GL_CLAMP_TO_EDGE); m_renderTargets.append(new GLRenderTarget(m_renderTextures.last())); } // This last set is used as a temporary helper texture - m_renderTextures.append(GLTexture(GL_RGBA8, effects->virtualScreenSize())); + m_renderTextures.append(GLTexture(GL_SRGB8_ALPHA8, effects->virtualScreenSize())); m_renderTextures.last().setFilter(GL_LINEAR); m_renderTextures.last().setWrapMode(GL_CLAMP_TO_EDGE); @@ -637,9 +637,12 @@ */ if (isDock) { m_renderTargets.last()->blitFromFramebuffer(sourceRect, destRect); + glEnable(GL_FRAMEBUFFER_SRGB); + copyScreenSampleTexture(vbo, blurRectCount, shape.translated(xTranslate, yTranslate), screenProjection); } else { m_renderTargets.first()->blitFromFramebuffer(sourceRect, destRect); + glEnable(GL_FRAMEBUFFER_SRGB); // Remove the m_renderTargets[0] from the top of the stack that we will not use GLRenderTarget::popRenderTarget(); @@ -664,6 +667,8 @@ upscaleRenderToScreen(vbo, blurRectCount * (m_downSampleIterations + 1), shape.rectCount() * 6, screenProjection, windowRect.topLeft()); + glDisable(GL_FRAMEBUFFER_SRGB); + if (opacity < 1.0) { glDisable(GL_BLEND); }