mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
changed how the crt effect and terminal blend, now the colors arent washed out
This commit is contained in:
@@ -22,12 +22,12 @@ using namespace metal;
|
||||
|
||||
//scanlines
|
||||
half scanline = 0.5 + 0.5 * sin(uv.y * 1250.0);
|
||||
scanline *= 0.5;
|
||||
// scanline *= 0.5;
|
||||
|
||||
half3 newColor = scanwave*scanline;
|
||||
|
||||
half alpha = 1 - scanline;
|
||||
alpha *= 0.5;
|
||||
alpha *= 1;
|
||||
|
||||
// half4 output = half4(layer.sample(pos).xyz*newCol, 1);
|
||||
half4 output = half4(color.xyz*newColor*alpha, alpha);
|
||||
|
||||
@@ -52,6 +52,10 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
|
||||
}
|
||||
}
|
||||
|
||||
override func cursorStyleChanged(source: Terminal, newStyle: CursorStyle) {
|
||||
|
||||
}
|
||||
|
||||
func startFeedLoop() {
|
||||
Task {
|
||||
guard let handler else { return }
|
||||
@@ -59,6 +63,7 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
|
||||
if let read = handler.readFromChannel() {
|
||||
await MainActor.run {
|
||||
self.feed(text: read)
|
||||
print(getTerminal().getCursorLocation())
|
||||
}
|
||||
} else {
|
||||
try? await Task.sleep(nanoseconds: 10_000_000) //10ms
|
||||
|
||||
@@ -16,16 +16,16 @@ struct ShellView: View {
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
@State var startTime: Date = .now
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
let time = startTime.timeIntervalSinceNow
|
||||
ZStack {
|
||||
hostsManager.selectedTheme.background.suiColor
|
||||
.ignoresSafeArea(.all)
|
||||
|
||||
ZStack {
|
||||
TerminalController(handler: handler, hostsManager: hostsManager)
|
||||
.colorMultiply(Color(red: 0.95, green: 1, blue: 0.95, opacity: 1))
|
||||
.colorMultiply(.white)
|
||||
// .visualEffect { content, proxy in
|
||||
// content
|
||||
// .layerEffect(
|
||||
@@ -36,14 +36,15 @@ struct ShellView: View {
|
||||
// maxSampleOffset: .zero
|
||||
// )
|
||||
// }
|
||||
// .blendMode(.screen)
|
||||
.overlay {
|
||||
if hostsManager.settings.filter == .crt {
|
||||
CRTView()
|
||||
.opacity(0.75)
|
||||
.blendMode(.overlay)
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Group {
|
||||
Color.gray.opacity(0.2)
|
||||
|
||||
Reference in New Issue
Block a user