Skip to content

Instantly share code, notes, and snippets.

//
// Metalic.metal
// Metalic
//
// Created by 김수환 on 2/16/26.
//
#include <metal_stdlib>
#include <SwiftUI/SwiftUI.h>
#include <metal_stdlib>
#include "SwiftUI/SwiftUI.h"
using namespace metal;
// made with claude code
[[ stitchable ]] half4 shredder(float2 position, SwiftUI::Layer layer, float2 size, float offset) {
float padding = 80;
if (position.y < size.y + padding) {
float2 p = position;
p.y -= max(offset, 0.0);
@tkgka
tkgka / zshrc
Last active August 22, 2026 18:00
openSimulatorFinder
function openSimulatorFinder() {
if [ $# -ne 1 ]; then
open `xcrun simctl get_app_container booted default-bundle-identifier data`
else
open `xcrun simctl get_app_container booted $1 data`
fi
}
// usage
// openSimulatorFinder //or
@tkgka
tkgka / Sticker.Metal
Last active April 2, 2026 20:44
Sticker shader
#include <metal_stdlib>
#include <SwiftUI/SwiftUI.h>
using namespace metal;
[[ stitchable ]] half4 Sticker(float2 position, SwiftUI::Layer layer, float2 size, float2 offset) {
offset.x *= 3;
float angle = offset.y * (360 / size.x) * 0.02; // adjust multiplier to control sensitivity
half4 original_color = layer.sample(position);