shaderstuff

This commit is contained in:
neon443
2025-08-25 14:12:03 +01:00
parent 4f92d34d1a
commit 8ae9cc8ead
4 changed files with 58 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
//
// CRT.metal
// ShhShell
//
// Created by neon443 on 25/08/2025.
//
#include <metal_stdlib>
using namespace metal;
//learning shaders stuff here
[[ stitchable ]] half4 opacityInvert(float2 position, half4 color) {
return half4(1, 0, 0, color.a);
}
[[ stitchable ]] half4 redify(float2 pos, half4 color) {
return half4(1, 0, 0, 0.1);
}
[[ stitchable ]] half4 passthrough(float2 position, half4 color) {
return color;
}

View File

@@ -0,0 +1,21 @@
//
// ShaderTestingView.swift
// ShhShell
//
// Created by neon443 on 25/08/2025.
//
import SwiftUI
struct ShaderTestingView: View {
var body: some View {
Image(systemName: "figure.walk.circle")
.font(.system(size: 300))
.foregroundStyle(.blue)
.colorEffect(ShaderLibrary.redify())
}
}
#Preview {
ShaderTestingView()
}

View File

@@ -39,6 +39,11 @@ struct SettingsView: View {
.ignoresSafeArea(.all)
List {
Section("Terminal") {
Image(systemName: "figure.walk.circle")
.font(.system(size: 300))
.foregroundStyle(.blue)
.colorEffect(ShaderLibrary.redify())
VStack(alignment: .leading) {
HStack {
Label("Scrollback", systemImage: "scroll")