Skip to content
/ stardust Public

An N-body simulation using Apple's Metal on the GPU

Notifications You must be signed in to change notification settings

Lumbi/stardust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stardust

An N-body simulation using Metal.

It simulates gravity-like forces between 10,000 particles on the GPU using a compute kernel (that's 100,0000,000 computations per frame!).

Each particle is rendered as a textured mesh using instance drawing. It runs at about ~30 FPS on my old MacBook Pro (2018). Mouse and WASD to move the camera around.

This exercise helped me understand better how Apple's Metal API is structured and how it differs from OpenGL.

Texture by: Joshua "JDSherbert" Herbert. https://jdsherbert.itch.io/pbr-materials-pack-free

About

An N-body simulation using Apple's Metal on the GPU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published