okay finally got fucking shaders working

This commit is contained in:
neon443
2025-08-25 15:02:35 +01:00
parent 8ae9cc8ead
commit 32861b7292
2 changed files with 6 additions and 3 deletions

View File

@@ -13,8 +13,11 @@ using namespace metal;
return half4(1, 0, 0, color.a); return half4(1, 0, 0, color.a);
} }
[[ stitchable ]] half4 redify(float2 pos, half4 color) { [[ stitchable ]] half4 redify(float2 position, half4 color) {
return half4(1, 0, 0, 0.1); 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) { [[ stitchable ]] half4 passthrough(float2 position, half4 color) {

View File

@@ -42,7 +42,7 @@ struct SettingsView: View {
Image(systemName: "figure.walk.circle") Image(systemName: "figure.walk.circle")
.font(.system(size: 300)) .font(.system(size: 300))
.foregroundStyle(.blue) .foregroundStyle(.blue)
.colorEffect(ShaderLibrary.redify()) .colorEffect(ShaderLibrary.scanlines())
VStack(alignment: .leading) { VStack(alignment: .leading) {
HStack { HStack {