A native macOS Metal Shading Language (MSL) playground/editor, written in Swift/SwiftUI.
It's a split-pane app: an MSL code editor on the left (with neon syntax highlighting via the MacfragNeonTheme/MacfragTextDefaultsPlugin/MacfragAppearancePlugin plugins on MSLCodeEditor.swift) and a live Metal shader preview on the right (MetalShaderPreview.swift) that compiles the source and renders the fragment shader, with a build log panel underneath the editor.

Early/work-in-progress:
- Editor is rough.
- Debug/build-log pane is rough.
- File save works.
- Syntax highlighting only paints characters as you type (and only the affected characters).
- macOS with Metal support
- Xcode
Open macfrag.xcodeproj in Xcode and run the macfrag scheme.
macfrag/macfragApp.swift— app entry pointmacfrag/ContentView.swift— split-pane root view, ships a default MSL fragment shadermacfrag/MSLCodeEditor.swift— MSL source editormacfrag/MetalShaderPreview.swift— live Metal compile + render previewmacfrag/MacfragNeonTheme.swift— neon syntax highlighting thememacfrag/MacfragAppearancePlugin.swift,MacfragTextDefaultsPlugin.swift— editor pluginsmacfrag/MacfragTextView.swift— underlying text viewmacfragTests/,macfragUITests/— test targets