Commit a0a47239 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik Committed by Victoria Fischer
Browse files

effects/blur: Generate noise texture on demand

It is relatively expensive and there is no need to do it unless
there are actually windows that make use of the blur effect.

Signed-off-by: default avatarVictoria Fischer <>
parent 8b4ffd5c
Pipeline #227319 passed with stage
in 17 minutes and 43 seconds
......@@ -195,8 +195,8 @@ void BlurEffect::updateTexture()
// Copysample
// Generate the noise helper texture
// Invalidate noise texture
void BlurEffect::initBlurStrengthValues()
......@@ -799,6 +799,10 @@ void BlurEffect::upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int bl
void BlurEffect::applyNoise(GLVertexBuffer *vbo, int vboStart, int blurRectCount, const QMatrix4x4 &screenProjection, QPoint windowPosition)
if (!m_noiseTexture) {
m_shader->setTargetTextureSize(m_renderTextures[0]->size() * effects->renderTargetScale());
m_shader->setNoiseTextureSize(m_noiseTexture->size() * effects->renderTargetScale());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment