Skip to content

lachlanhurst/waves-metalcompute

Repository files navigation

Waves in Metal compute shaders

The algorithm is based on simple Euler integration, you can find a JavaScript implementation here.

The 'working with Metal' parts of this project owe much to FlexMonkey's Reaction Diffusion using Swift & Metal.

Wave simulation

YouTube video of simlation

The black quad seen in the screenshots and video is SceneKit geometry (SCNPlane), the texture of this SCNGeometry is set to be the output texture of the Metal compute shader. SceneKit also handles the hit detection, the hit coordinates are translated into texture coordinates and drawn into the input textures (red square seen in video).

LICENSE

MIT

About

Basic wave simulation using Metal compute shaders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages