whatisgithub

What is bottomgradientshader?

radiofun/bottomgradientshader — explained in plain English

Analysis updated 2026-05-18

23MetalAudience · developerComplexity · 2/5Setup · easy

In one sentence

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.

Mindmap

mindmap
  root((BottomGradientShader))
    What it does
      Animated glow effect
      Metal shader rendering
      SwiftUI layerEffect
    Tech stack
      SwiftUI
      Metal
      Xcode
    Use cases
      Notification reveals
      Game UI glow
      Media surface underglow
    Audience
      iOS developers
      Designers
      Swift engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add an animated glow effect behind a notification banner in an iOS app.

USE CASE 2

Use the ambient light view as a background accent in a game or controller interface.

USE CASE 3

Customize the Metal shader to change the glow color, spread, and drifting texture.

USE CASE 4

Study the project as an example of combining SwiftUI layerEffect with a custom Metal shader.

What is it built with?

SwiftSwiftUIMetalXcode

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires a recent Xcode and SDK version that supports newer SwiftUI visual effects like glassEffect.

No license is stated in the README, check the repository directly before reuse.

So what is it?

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.

Copy-paste prompts

Prompt 1
Show me how to add BottomAmbientLightView to my SwiftUI app and animate its progress value.
Prompt 2
Explain how the SwiftUI layerEffect and the Metal shader work together in this project.
Prompt 3
Help me customize BottomAmbientShader.metal to change the glow color and spread.
Prompt 4
Walk me through the project structure and what each file in BottomGradientShader does.

Frequently asked questions

What is bottomgradientshader?

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.

What language is bottomgradientshader written in?

Mainly Metal. The stack also includes Swift, SwiftUI, Metal.

What license does bottomgradientshader use?

No license is stated in the README, check the repository directly before reuse.

How hard is bottomgradientshader to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is bottomgradientshader for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.