1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-01-18 20:20:45 +00:00

Avoid border artifacts on burn in effect.

This commit is contained in:
Filippo Scognamiglio 2018-11-23 21:09:10 +01:00
parent 82f2bd6231
commit a2455daa6c

View File

@ -298,7 +298,6 @@ ShaderEffect {
color += randomPass(coords * virtual_resolution) * glowingLine;" : "") + color += randomPass(coords * virtual_resolution) * glowingLine;" : "") +
"vec3 txt_color = texture2D(source, txt_coords).rgb;" + "vec3 txt_color = texture2D(source, txt_coords).rgb;" +
"txt_color *= min2(step(vec2(0.0), staticCoords) - step(vec2(1.0), staticCoords));" +
(rbgShift !== 0 ? " (rbgShift !== 0 ? "
vec2 displacement = vec2(12.0, 0.0) * rbgShift * (0.6 * constantNoise.r + 0.4); vec2 displacement = vec2(12.0, 0.0) * rbgShift * (0.6 * constantNoise.r + 0.4);
@ -315,6 +314,7 @@ ShaderEffect {
txt_color = max(txt_color, 0.5 * (txt_blur.rgb - vec3(blurDecay)));" txt_color = max(txt_color, 0.5 * (txt_blur.rgb - vec3(blurDecay)));"
: "") + : "") +
"txt_color *= min2(step(vec2(0.0), staticCoords) - step(vec2(1.0), staticCoords));" +
"txt_color *= getScanlineIntensity(coords);" + "txt_color *= getScanlineIntensity(coords);" +
"txt_color += fontColor.rgb * color;" + "txt_color += fontColor.rgb * color;" +