Analysis updated 2026-05-18
Add an animated glow effect behind a notification banner in an iOS app.
Use the ambient light view as a background accent in a game or controller interface.
Customize the Metal shader to change the glow color, spread, and drifting texture.
Study the project as an example of combining SwiftUI layerEffect with a custom Metal shader.
Requires a recent Xcode and SDK version that supports newer SwiftUI visual effects like glassEffect.
BottomGradientShader is a small example project that shows how to add a soft, glowing light effect that seems to rise up from the bottom edge of a screen in an app built with SwiftUI, Apple's interface framework. Rather than using a static image, the glow is drawn in real time using Metal, Apple's graphics programming language, so it can animate and drift naturally like mist or floating light particles. The project includes two views to try out. One is the reusable glow view itself, which can be dropped behind any other content in an app. The other is a demo that shows the effect combined with a toggle button and a glassy interface style, with the light animating into view. Opening the project in Xcode and running its built in preview shows the full demo working. To use the effect in your own app, you add the Swift view file and the Metal shader file to your project, then place the glow view behind your other content inside a layered stack, giving it a tint color and a progress value between zero and one that controls how much of the light is revealed. Animating that progress value produces a smooth upward reveal of the glow. A handful of settings let you customize the look further, including the tint color, how far the light spreads upward, the intensity of the misty texture and small floating light specks, and their overall brightness. Someone wanting deeper control can edit the underlying Metal shader code directly to adjust these effects. The project targets recent versions of iOS, iPadOS, macOS, and visionOS, and requires a fairly new version of Xcode since it relies on newer SwiftUI visual effects. It is useful for things like notification animations, game or controller interfaces, or media screens that want a subtle glow without using image assets.
A SwiftUI plus Metal example that renders an animated, glowing ambient light rising from the bottom of an app screen, with no image assets needed.
Mainly Metal. The stack also includes Swift, SwiftUI, Metal.
No license is stated in the README, check the repository directly before reuse.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.