Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 827 Bytes

README.md

File metadata and controls

15 lines (8 loc) · 827 Bytes

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