From 32861b7292110cb03b35af74d7625f5b09754b4c Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Mon, 25 Aug 2025 15:02:35 +0100 Subject: [PATCH] okay finally got fucking shaders working --- ShhShell/Terminal/CRT.metal | 7 +++++-- ShhShell/Views/Settings/SettingsView.swift | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ShhShell/Terminal/CRT.metal b/ShhShell/Terminal/CRT.metal index e34bc89..3921242 100644 --- a/ShhShell/Terminal/CRT.metal +++ b/ShhShell/Terminal/CRT.metal @@ -13,8 +13,11 @@ using namespace metal; return half4(1, 0, 0, color.a); } -[[ stitchable ]] half4 redify(float2 pos, half4 color) { - return half4(1, 0, 0, 0.1); +[[ stitchable ]] half4 redify(float2 position, half4 color) { + if (color.a == 0) { + return half4(0,0,0,0); + } + return half4(1 * color.a, 0, 0, color.a); } [[ stitchable ]] half4 passthrough(float2 position, half4 color) { diff --git a/ShhShell/Views/Settings/SettingsView.swift b/ShhShell/Views/Settings/SettingsView.swift index 07a19e2..b5e73fa 100644 --- a/ShhShell/Views/Settings/SettingsView.swift +++ b/ShhShell/Views/Settings/SettingsView.swift @@ -42,7 +42,7 @@ struct SettingsView: View { Image(systemName: "figure.walk.circle") .font(.system(size: 300)) .foregroundStyle(.blue) - .colorEffect(ShaderLibrary.redify()) + .colorEffect(ShaderLibrary.scanlines()) VStack(alignment: .leading) { HStack {