Matt Pfeiffer ᯅ
banner
mattpfeiffer.bsky.social
Matt Pfeiffer ᯅ
@mattpfeiffer.bsky.social
 Platforms Engineer | Audio/Graphics | RealityKit | Metal
RealityKit experiment #86
(code in the replies)

Here's a simple PSVR2 Sense Controller example that handles the inputs, tracks the aim anchor, and triggers haptics
November 22, 2025 at 2:03 PM
RealityKit experiment #85
(code in the replies)

I made one more update to my Logitech Muse example to preserve the anchor orientation when spawning the model. Switched to cubes to demonstrate and added a little axis indicator at the aim
November 12, 2025 at 12:46 PM
RealityKit experiment #84
(code in the replies)

Here's an update to my Logitech Muse example that handles the pressure values for the tip and secondary button
November 6, 2025 at 1:54 PM
RealityKit experiment #83
(code in the replies)

This example turns the Logitech Muse into a virtual laser pen for point-to-point measurements. The surface intersection point is determined by raycasting along the stylus' aim-origin vector against the scene reconstruction meshes
October 27, 2025 at 11:23 AM
RealityKit experiment #82
(code in the replies)

Here’s a simple Logitech Muse example that tracks the aim, handles the action buttons, and triggers haptics
October 24, 2025 at 10:14 AM
RealityKit experiment #81
(code in the replies)

I found a scan of a human skeleton and wanted to try to visualize it in RealityKit. The PLY file had millions of triangles, so I had to decimate the mesh. It ended up being really satisfying to see the wireframe at different LODs
October 5, 2025 at 5:05 PM
RealityKit experiment #80
(gist in the replies)

LowLevelMesh “Falling Sand” dissolution and reassemble effect created with SDF shapes and Marching Cubes. A Metal compute shader uses a spatial sweep to "release" triangles that rigidly start to fall
October 2, 2025 at 9:45 AM
RealityKit experiment #79
(code in the replies)

Animating 3D text by converting the output of MeshResource(extruding:) to a LowLevelMesh and applying a Metal compute shader

The MeshResource was interesting to unpack since it had multiple models/parts plus instance transforms
September 25, 2025 at 11:27 AM
RealityKit experiment #78
(gist in the replies)

LowLevelMesh explode-and-assemble animation created by meshing an SDF using Marching Cubes and rigidly pushing it’s triangles outward
September 18, 2025 at 11:24 AM
RealityKit experiment #77
(gist in the replies)

Color-blending metaballs created from animated sphere SDFs via Marching Cubes. LowLevelMesh vertices store per-vertex color in the Geometry Color vertex attribute, read by ShaderGraphMaterial
August 29, 2025 at 12:20 PM
RealityKit experiment #76
(gist in the replies)

LowLevelMesh blob from meshing the smooth-min of animated sphere SDFs with marching cubes. Glassy ShaderGraphMaterial is based on Apple's "Implementing adjustable material" sample
August 20, 2025 at 8:59 AM
RealityKit experiment #75
(gist in the replies)

LowLevelMesh shape shifting by interpolating between two signed distance fields and meshing with marching cubes
August 13, 2025 at 11:40 AM
RealityKit experiment #74
(gist in the replies)

- LowLevelMesh with disconnected geometry
- Marching Cubes + SDF for vertex positions
- Vertex normals from SDF gradient
- Polynomial smooth-min to blend the shapes
August 8, 2025 at 11:15 AM
RealityKit experiment #73
(gist in the replies)

Here's a simple burn fade example. The ShaderGraphMaterial directly sets the color and opacity from the UV2 attribute of the LowLevelMesh vertices and the Metal compute shader updates those color/opacity values
July 22, 2025 at 12:22 AM
RealityKit experiment #72
(gist in the comments)

LowLevelMesh Torus Spinner
- incrementally adds vertices/indices (or shifts the indexOffset when removing)
- multiple layers of varying opacity and minor radius are stacked with additive blend mode for the glow effect
July 20, 2025 at 12:42 PM
RealityKit experiment #71
(gist in the comments)

- Loads mesh & texture from USDZ
- LowLevelMesh verts use float4 color+alpha in uv2
- ShaderGraphMaterial blends texture with uv2.rgb, sets opacity from uv2.w
- Metal Compute Shader animates uv2
July 16, 2025 at 11:30 AM
RealityKit experiment #70
(gist in the comments)

Grass Mesh with Wind 🌬️🌿
- Single LowLevelMesh with part for each blade
- Poisson Disk Sampling for evenly distributed blade placement
- Incremental mesh growth performed on CPU
- Compute Shader for offsetting vertices on GPU
July 6, 2025 at 3:43 PM
RealityKit experiment #69 🇺🇸🔊
(gist in the comments)

Happy 4th of July!!
- LowLevelMesh + compute shader for flag
- Burst particles + point light for fireworks
- Entity.playAudio(resource:) for sound
- MeshResource(extruding:) for text
July 4, 2025 at 3:26 PM
RealityKit experiment #68
(gist in the comments)

One LowLevelMesh with 50 procedurally growing branches. Each branch pre-allocates vertex/index space with offsets. Using multiple parts with index offsets organizes the bookkeeping which enables growing each branch incrementally
June 30, 2025 at 3:07 PM
RealityKit experiment #67
(gist in the comments)

LowLevelMesh with multiple parts and material indexing
June 29, 2025 at 3:45 PM
RealityKit experiment #66
(gist in the comments)

LowLevelMesh growing/shrinking branch
June 28, 2025 at 11:33 AM
RealityKit experiment #65
(code in the comments)

LowLevelMesh sphere to circular plane morph using Metal compute shader
June 22, 2025 at 2:30 PM
RealityKit experiment #64
(code in the comments)

LowLevelMesh sphere to rectangular plane morph using Metal compute shader
June 21, 2025 at 2:17 PM
RealityKit experiment #63
(code in the comments)

Procedural tree with LowLevelMesh. Branching is still pretty simple, but figured I'd share before going too deep into growth direction algorithms
June 14, 2025 at 3:35 PM
RealityKit experiment #62
(code in the comments)

Pancake effect using LowLevelMesh and a Metal compute shader. It progressively compresses all vertices towards the minimum Z bound
June 1, 2025 at 3:10 PM