Fix blur on Wayland when scaling is used
Summary: Blur should now work on Wayland when scaling is used. This does not affect X11 as `GLRenderTarget::virtualScreenScale()` is always 1 on X11 BUG: 391387 Depends on D12678 Test Plan: - log in in a Wayland session - turn display scaling to 2x - open a transparent window (for example: Konsole with transparent and blur enabled profile) - blurs the content under the window corretly Reviewers: davidedmundson, #kwin Reviewed By: davidedmundson, #kwin Subscribers: romangg, apol, zzag, kwin, #kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D12700
This commit is contained in:
parent
42dc3e4cd5
commit
b3b691a250
1 changed files with 4 additions and 4 deletions
|
@ -681,15 +681,15 @@ void BlurEffect::upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int bl
|
|||
|
||||
if (m_noiseStrength > 0) {
|
||||
m_shader->bind(BlurShader::NoiseSampleType);
|
||||
m_shader->setTargetTextureSize(m_renderTextures[0].size());
|
||||
m_shader->setNoiseTextureSize(m_noiseTexture.size());
|
||||
m_shader->setTexturePosition(windowPosition);
|
||||
m_shader->setTargetTextureSize(m_renderTextures[0].size() * GLRenderTarget::virtualScreenScale());
|
||||
m_shader->setNoiseTextureSize(m_noiseTexture.size() * GLRenderTarget::virtualScreenScale());
|
||||
m_shader->setTexturePosition(windowPosition * GLRenderTarget::virtualScreenScale());
|
||||
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
m_noiseTexture.bind();
|
||||
} else {
|
||||
m_shader->bind(BlurShader::UpSampleType);
|
||||
m_shader->setTargetTextureSize(m_renderTextures[0].size());
|
||||
m_shader->setTargetTextureSize(m_renderTextures[0].size() * GLRenderTarget::virtualScreenScale());
|
||||
}
|
||||
|
||||
m_shader->setOffset(m_offset);
|
||||
|
|
Loading…
Reference in a new issue