diff --git a/interface/resources/shaders/horizontal_blur.frag b/interface/resources/shaders/horizontal_blur.frag index 2f31849815..695de1a538 100644 --- a/interface/resources/shaders/horizontal_blur.frag +++ b/interface/resources/shaders/horizontal_blur.frag @@ -13,20 +13,12 @@ uniform sampler2D originalTexture; void main(void) { float ds = dFdx(gl_TexCoord[0].s); - gl_FragColor = (texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -15.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -13.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -11.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -9.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -7.5, 0.0)) + + gl_FragColor = (texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -7.5, 0.0)) + texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -5.5, 0.0)) + texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -3.5, 0.0)) + texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * -1.5, 0.0)) + texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 1.5, 0.0)) + texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 3.5, 0.0)) + texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 5.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 7.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 9.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 11.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 13.5, 0.0)) + - texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 15.5, 0.0))) / 16.0; + texture2D(originalTexture, gl_TexCoord[0].st + vec2(ds * 7.5, 0.0))) / 8.0; } diff --git a/interface/resources/shaders/vertical_blur.frag b/interface/resources/shaders/vertical_blur.frag index 012389622e..6e49c5b553 100644 --- a/interface/resources/shaders/vertical_blur.frag +++ b/interface/resources/shaders/vertical_blur.frag @@ -16,21 +16,13 @@ uniform sampler2D horizontallyBlurredTexture; void main(void) { float dt = dFdy(gl_TexCoord[0].t); - vec4 blurred = (texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -15.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -13.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -11.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -9.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -7.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -4.5)) + + vec4 blurred = (texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -7.5)) + + texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -5.5)) + texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -3.5)) + texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * -1.5)) + texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 1.5)) + texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 3.5)) + texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 5.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 7.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 9.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 11.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 13.5)) + - texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 15.5))) / 16.0; + texture2D(horizontallyBlurredTexture, gl_TexCoord[0].st + vec2(0.0, dt * 7.5))) / 8.0; gl_FragColor = blurred * blurred.a + texture2D(originalTexture, gl_TexCoord[0].st) * (1.0 + blurred.a * 0.5); }