Skip to content

Instantly share code, notes, and snippets.

@Matt54
Matt54 / MetalCubeExample.swift
Last active January 6, 2025 17:29
Cube / Sphere RealityView using LowLevelMesh with metal shader
import SwiftUI
import RealityKit
import Metal
struct CubeSphereState {
var size: SIMD3<Float> = [0.3, 0.3, 0.3]
var planeResolution: SIMD2<UInt32> = [16, 16]
var cubeSphereInterpolationRatio: Float = 0.0
}