diff --git a/ShhShell/Terminal/CRT.metal b/ShhShell/Terminal/CRT.metal index a8ee1cd..3f79b0f 100644 --- a/ShhShell/Terminal/CRT.metal +++ b/ShhShell/Terminal/CRT.metal @@ -17,20 +17,20 @@ using namespace metal; float2 bottomTrailing = size; // scanwave - half3 scanwave = 0.5 + 0.5 * sin(time + uv.y*10); - scanwave*=2; +// half3 scanwave = 0.5 + 0.5 * sin(time + uv.y*10); +// scanwave*=2; //scanlines half scanline = 0.5 + 0.5 * sin(uv.y * 1250.0); - scanline *= 0.5; +// scanline *= 0.5; - half3 newColor = scanwave*scanline; + half3 newColor = /*scanwave**/scanline; -// half alpha = 1 - scanline; -// half alpha = 0.5; + half alpha = 1 - scanline; + alpha *= 0.5; // half4 output = half4(layer.sample(pos).xyz*newCol, 1); - half4 output = half4(color.xyz*newColor, 1); + half4 output = half4(color.xyz*newColor*alpha, alpha); return output; } diff --git a/ShhShell/Views/Terminal/ShellView.swift b/ShhShell/Views/Terminal/ShellView.swift index 473280d..59973da 100644 --- a/ShhShell/Views/Terminal/ShellView.swift +++ b/ShhShell/Views/Terminal/ShellView.swift @@ -25,15 +25,14 @@ struct ShellView: View { ZStack { TerminalController(handler: handler, hostsManager: hostsManager) // .colorMultiply(Color(red: 0.95, green: 1, blue: 0.95, opacity: 1)) -// .colorMultiply(.white) - .overlay { - if hostsManager.settings.filter == .crt { - CRTView() - .opacity(0.75) -// .blendMode(.overlay) - .allowsHitTesting(false) - } - } + .brightness(0.2) + if hostsManager.settings.filter == .crt { + CRTView() + .opacity(0.75) + .brightness(-0.2) + .blendMode(.overlay) + .allowsHitTesting(false) + } } Group {