diff --git a/app/PreprocessedTerminal.qml b/app/PreprocessedTerminal.qml index 11f6cc5..7720f49 100644 --- a/app/PreprocessedTerminal.qml +++ b/app/PreprocessedTerminal.qml @@ -220,7 +220,6 @@ Item{ id: finalSource sourceItem: blurredterminal sourceRect: frame.sourceRect - //format: ShaderEffectSource.Alpha hideSource: true } ShaderEffect { @@ -258,19 +257,18 @@ Item{ coords.x = floor(virtual_resolution.x * coords.x) / virtual_resolution.x;" : "") : "") + "coords = coords + delta;" + - "vec4 vcolor = texture2D(source, coords) * 256.0; - float color = rgb2grey(vcolor);" + + + "vec4 color = texture2D(source, coords) * 256.0; + color.a = rgb2grey(color.rgb);" + + (mBlur !== 0 ? - "vec4 blurredVcolor = texture2D(blurredSource, coords) * 256.0;" + - "float blurredSourceColor = texture2D(blurredSource, coords).a * 256.0;" + - "blurredSourceColor = blurredSourceColor - blurredSourceColor * " + (1.0 - motionBlurCoefficient) * fpsAttenuation+ ";" + - "vcolor = step(1.0, color) * vcolor + step(color, 1.0) * blurredVcolor;" + - "color = step(1.0, color) * color + step(color, 1.0) * blurredSourceColor;" + "vec4 blur_color = texture2D(blurredSource, coords) * 256.0;" + + "blur_color.a = blur_color.a - blur_color.a * " + (1.0 - motionBlurCoefficient) * fpsAttenuation+ ";" + + "color = step(1.0, color.a) * color + step(color.a, 1.0) * blur_color;" : "") + - "gl_FragColor = floor(vcolor) / 256.0;" + - "gl_FragColor.a = floor(color) / 256.0;" + + "gl_FragColor = floor(color) / 256.0;" + "}" onStatusChanged: if (log) console.log(log) //Print warning messages