Please sign in to access this page
A macOS screensaver that simulates wave propagation using Metal. This screensaver implements a numerical solution to the 2D wave equation using Metal compute shaders, and results in a beautiful screensaver that is always unique. Random disturbances are periodically added.
For the most up-to-date and detailed information, consult the README and/or the GitHub repository.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
I've mainly been working on optimization. I integrated Metal Performance shaders where they helped, which greatly increased performance and efficiency of the shader. I also tweaked some setup methods for the shader & its renderer, with the goal of optimization in mind. I replaced the bloom effect with an edge glow based on Sobel image detection, which had… interesting effects.
In addition to optimization, I also setup a simple application to display the shader. This greatly helps quick testing, as the app is much easier to profile and see than the screensaver. I may extend this app to the Apple TV, but that is just a concept for the time being.
Aside from other improvements, made the first (notarized!) release.
View at https://github.com/acemavrick/wavefunction-screensaver/releases/tag/v1.0.0 .
Completed the core implementation of a Metal-based wave simulation screensaver for macOS. The screensaver simulates fluid-like wave propagation using a computational physics model that updates in real-time.
The implementation uses three ping-pong buffers to track the previous, current, and next states of the wave field. Each pixel stores both height and velocity information as a SIMD2 vector. The simulation applies a basic wave equation with configurable parameters for wave speed, damping, and time step size.
Also created a disturbance system that randomly creates ripples across the surface at varying intervals. These disturbances have randomized positions, strengths, and radii, creating an ever-changing pattern of interference waves that never quite repeats.
The rendering pipeline uses a vertex shader that creates a full-screen quad and a fragment shader that visualizes the wave heights. The compute pipelines handle the wave equation calculations, buffer copying for the next frame, and adding new disturbances.
The current implementation renders the waves in grayscale, with potential for adding more visualization options with customizable color maps in future updates.
For more information, consult the README.