Skip to content

Instantly share code, notes, and snippets.

View ManjitBedi's full-sized avatar
💭
working on some projects using Unity & coding in c#

Manjit Bedi ManjitBedi

💭
working on some projects using Unity & coding in c#
View GitHub Profile
@tomkrikorian
tomkrikorian / rcp3-shadergraph-nodes-catalog.md
Created June 19, 2026 05:45
Reality Composer Pro 3 - Shadergraph nodes catalog

Reality Composer Pro 3 - ShaderGraph Nodes Catalog

Generated: 2026-06-19T05:40:48+00:00

Source app: /Applications/RealityComposerPro.app

Reality Composer Pro: 3.0 build 75.0.14.500.1

ShaderGraph framework: ShaderGraph source 159000000000001

@tomkrikorian
tomkrikorian / AGENTS.MD
Last active July 2, 2026 18:43
AGENTS.MD for visionOS 26 & Swift 6.2 development
name visionos-agent
description Senior visionOS Engineer and Spatial Computing Expert for Apple Vision Pro development.

VISIONOS AGENT GUIDE

ROLE & PERSONA

You are a Senior visionOS Engineer and Spatial Computing Expert. You specialize in SwiftUI, RealityKit, and ARKit for Apple Vision Pro. Your code is optimized for the platform, adhering strictly to Apple's Human Interface Guidelines for spatial design.

#include <metal_stdlib>
#include <SwiftUI/SwiftUI.h>
using namespace metal;
// 画面の曲面歪みを適用する関数
// この関数は、CRTモニターの曲面ガラスによる画像の歪みをシミュレートします。
// UV座標(0.0〜1.0の正規化座標)を入力とし、中央からの距離に基づいて
// バレル歪み(barrel distortion)を適用します。これにより、画面の端が
// 外側に膨張するような効果が生まれ、レトロなCRTの視覚を再現します。
// - Parameters:
@Matt54
Matt54 / ModelIOLoader.swift
Last active October 14, 2025 07:33
PLY to RealityKit with Grid-Based Decimation (Example: HD Skeleton Scan)
import Foundation
import ModelIO
import simd
nonisolated func loadMeshWithModelIO(from url: URL) throws -> TriangleMesh {
let asset = MDLAsset(url: url)
guard asset.count > 0 else {
throw NSError(domain: "ModelIO", code: 1, userInfo: [NSLocalizedDescriptionKey: "No objects found in file"])
}
@Matt54
Matt54 / EasingCurve.swift
Created October 2, 2025 04:22
RealityKit SDF Falling Sand Animation (Metal + LowLevelMesh + Marching Cubes)
import Foundation
enum EasingCurve {
case linear
case easeIn(Float)
case easeOut(Float)
case easeInOut(Float)
func apply(_ t: Float) -> Float {
let t = max(0, min(1, t))
@Matt54
Matt54 / ExtrudedTextLowLevelMeshView.swift
Created September 25, 2025 02:50
RealityKit Extruded Text to LowLevelMesh animated by Metal compute shader
import Metal
import RealityKit
import SwiftUI
#Preview { ExtrudedTextLowLevelMeshView() }
struct ExtrudedTextLowLevelMeshView: View {
@State var lowLevelMesh: LowLevelMesh?
@State var originalVerticesBuffer: MTLBuffer?
@State var timer: Timer?
@Matt54
Matt54 / EasingCurve.swift
Last active June 1, 2026 21:52
RealityKit Explode and Assemble SDF Shape (Metal + LowLevelMesh + Marching Cubes)
import Foundation
enum EasingCurve {
case linear
case easeIn(Float)
case easeOut(Float)
case easeInOut(Float)
func apply(_ t: Float) -> Float {
let t = max(0, min(1, t))
@Matt54
Matt54 / MarchingCubesColorBlobParams.h
Last active November 21, 2025 20:55
RealityKit Color-Blending Metaballs (Metal + LowLevelMesh + Marching Cubes)
#ifndef MarchingCubesColorBlobParams_h
#define MarchingCubesColorBlobParams_h
#include <simd/simd.h>
typedef struct {
simd_float3 center;
float radius;
simd_float3 color;
float _pad;
@Matt54
Matt54 / MarchingCubesBlobParams.h
Created August 19, 2025 23:21
RealityKit Marching Cubes Blob (Metal + LowLevelMesh)
#ifndef MarchingCubesBlobParams_h
#define MarchingCubesBlobParams_h
#include <simd/simd.h>
typedef struct {
simd_float3 center;
float radius;
} Sphere;
@Matt54
Matt54 / HeightMapParams.h
Last active June 18, 2025 12:19
RealityKit HeightMap Image to Terrain with LowLevelMesh and LowLevelTexture
#ifndef HeightMapParams_h
#define HeightMapParams_h
struct HeightMapParams {
simd_float2 size;
simd_uint2 dimensions;
};
#endif /* HeightMapParams_h */