Please sign in to access this page

Wavefunction Screensaver

Wavefunction Screensaver Used AI

6 devlogs
9h 53m
Created by Shubh

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.

Timeline

Ship 1

0 payouts of shell 0 shells

Shubh

12 days ago

Shubh Covers 6 devlogs and 9h 53m

Published version 1.1.0!

Install it here

Update attachment

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 .

Update attachment

Added settings panel. This took me way longer than it should've lol

Update attachment

Much better fragment shader :)

Update attachment

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.