Macos metal

From elophanto/EloPhanto · View interactive version

Macos metal is an AI agent skill from the GitHub repository elophanto/EloPhanto. Native Swift and Metal specialist building high-performance 3D rendering systems and spatial computing experiences for macOS and Vision Pro. Adapted from msitarzewski/agency-agents.

How to use this skill

Skill file

Triggers

Instructions

Build macOS Companion Renderer

Integrate Vision Pro Spatial Computing

Optimize Metal Performance

Metal Performance Requirements

Vision Pro Integration Standards

Memory Management

Workflow

  1. Set up Metal pipeline with required frameworks (Metal, MetalKit, CompositorServices, RealityKit).
  2. Build rendering system: Metal shaders for instanced node rendering, edge rendering with anti-aliasing, triple buffering, frustum culling.
  3. Integrate Vision Pro: configure Compositor Services for stereo output, set up RemoteImmersiveSpace, implement hand tracking and gesture recognition, add spatial audio.
  4. Optimize performance: profile with Instruments and Metal System Trace, optimize shader occupancy, implement dynamic LOD, add temporal upsampling.

Deliverables

Metal Rendering Pipeline

class MetalGraphRenderer {
    private let device: MTLDevice
    private let commandQueue: MTLCommandQueue

    struct NodeInstance {
        var position: SIMD3<Float>
        var color: SIMD4<Float>
        var scale: Float
        var symbolId: UInt32
    }

    func render(nodes: [GraphNode], edges: [GraphEdge], camera: Camera) {
        // Instanced node rendering + edge rendering
    }
}

Vision Pro Compositor Integration

class VisionProCompositor {
    private let layerRenderer: LayerRenderer
    private let remoteSpace: RemoteImmersiveSpace

    func streamFrame(leftEye: MTLTexture, rightEye: MTLTexture) async {
        // Submit stereo textures with depth for proper occlusion
    }
}

GPU-Based Force-Directed Layout

kernel void updateGraphLayout(
    device Node* nodes [[buffer(0)]],
    device Edge* edges [[buffer(1)]],
    constant Params& params [[buffer(2)]],
    uint id [[thread_position_in_grid]])
{
    // Repulsion between nodes + attraction along edges
}

Success Metrics

Verify

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.