✨ 29 ultra-fast, zero-dependency AGSL shaders for Jetpack Compose — animated gradients, noise fields, and image filters that run entirely on the GPU.
Repo AndroidPoet/mirage, read from GitHub 2 h ago. AndroidPoet has not joined Take My Repo.
AndroidPoet/mirage is a public repo on GitHub by AndroidPoet. ✨ 29 ultra-fast, zero-dependency AGSL shaders for Jetpack Compose — animated gradients, noise fields, and image filters that run entirely on the GPU. It declares the Apache-2.0 license on GitHub. It is written mainly in Kotlin, has 39 stars and last changed on 2026-07-05. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-24.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
✨ 29 ultra-fast, zero-dependency AGSL shaders for Jetpack Compose — animated gradients, noise fields, and image filters that run entirely on the GPU.
Beautiful shader backgrounds and image effects usually mean WebGL — not anymore. Mirage
brings a complete set of production-quality fragment shaders to Android as
RuntimeShader (AGSL) with idiomatic Compose APIs:
MeshGradient(), Metaballs(), Voronoi() …Modifier extensions that work on any composable content — Modifier.water(), Modifier.liquidMetal(), Modifier.halftoneCmyk() …Add the dependency below to your module's build.gradle.kts file:
dependencies {
implementation("io.github.androidpoet:mirage:$version")
}
Replace $version with the latest version shown on the badge above (currently 0.1.0).
Rendering uses RuntimeShader (AGSL), which requires Android 13 (API 33). The
library's minSdk is 21, so you can depend on it from any project — just gate the
shader composables at the call site:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
MeshGradient(Modifier.fillMaxSize())
} else {
// your own fallback (a static gradient, solid color, image…)
}
Mirage has two kinds of shaders:
| Kind | API shape | Fills… | Example |
|---|---|---|---|
| Procedural | @Composable fun Name(...) |
its own bounds | MeshGradient(Modifier.fillMaxSize()) |
| Image filter | Modifier.name(...) |
the content it modifies | Modifier.water() on an Image |
Every shader exposes its own uniforms plus a common set of controls:
| Control | Type | What it does |
|---|---|---|
speed |
Float |
Animation speed; 0f freezes the shader (no per-frame cost). |
startFrame |
Float |
Millisecond offset into the animation for a deterministic starting point. |
sizing |
SizingParams |
Fit, scale, rotation, origin, and offset of the graphic. |
Each shader also has a <Name>Defaults object holding its default colors, so you can reuse
or tweak the preset instead of hardcoding.
public data class SizingParams(
val fit: ShaderFit = ShaderFit.Contain, // None / Contain / Cover
val scale: Float = 1f,
val rotation: Float = 0f, // degrees
val originX: Float = 0.5f,
val originY: Float = 0.5f,
val offsetX: Float = 0f,
val offsetY: Float = 0f,
val worldWidth: Float = 0f, // 0 = use view size
val worldHeight: Float = 0f,
)
enum class ShaderFit { None, Contain, Cover }
Presets SizingParams.Object (fit = Contain) and SizingParams.Pattern (fit = None) are
provided; use .copy(...) to tweak. Many shaders also expose grainMixer / grainOverlay
(0f–1f) to add film-grain texture.
Voronoi(
modifier = Modifier.fillMaxSize(),
speed = 0.5f,
sizing = SizingParams(fit = ShaderFit.Cover, scale = 1.2f, rotation = 15f),
)
Composables that fill their bounds. All take modifier: Modifier = Modifier.
Overlapping translucent color panels sliding across a backdrop.
ColorPanels(
modifier: Modifier = Modifier,
colors: List<Color> = ColorPanelsDefaults.Colors,
colorBack: Color = ColorPanelsDefaults.ColorBack,
angle1: Float = 0f,
angle2: Float = 0f,
length: Float = 1.1f,
edges: Boolean = false,
blur: Float = 0f,
fadeIn: Float = 1f,
fadeOut: Float = 0.3f,
gradient: Float = 0f,
density: Float = 3f,
speed: Float = 0.5f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object.copy(scale = 0.8f),
)
ColorPanels(Modifier.fillMaxSize(), density = 4f, blur = 0.2f)
Retro ordered-dither pattern over a moving shape.
Dithering(
modifier: Modifier = Modifier,
colorBack: Color = DitheringDefaults.ColorBack,
colorFront: Color = DitheringDefaults.ColorFront,
shape: DitheringShape = DitheringShape.Sphere,
type: DitheringType = DitheringType.Bayer4x4,
size: Float = 2f,
speed: Float = 1f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Pattern.copy(scale = 0.6f),
)
Dithering(Modifier.fillMaxSize(), shape = DitheringShape.Swirl, type = DitheringType.Bayer8x8)
A grid of dots with per-dot size/opacity jitter.
DotGrid(
modifier: Modifier = Modifier,
colorBack: Color = DotGridDefaults.ColorBack,
colorFill: Color = DotGridDefaults.ColorFill,
colorStroke: Color = DotGridDefaults.ColorStroke,
size: Float = 2f,
gapX: Float = 32f,
gapY: Float = 32f,
strokeWidth: Float = 0f,
sizeRange: Float = 0f,
opacityRange: Float = 0f,
shape: DotGridShape = DotGridShape.Circle,
sizing: SizingParams = SizingParams.Pattern,
)
DotGrid(Modifier.fillMaxSize(), shape = DotGridShape.Diamond, gapX = 24f, gapY = 24f)
Dots orbiting on a repeating field.
DotOrbit(
modifier: Modifier = Modifier,
colorBack: Color = DotOrbitDefaults.ColorBack,
colors: List<Color> = DotOrbitDefaults.Colors,
size: Float = 1f,
sizeRange: Float = 0f,
spreading: Float = 1f,
stepsPerColor: Int = 4,
speed: Float = 1.5f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Pattern,
)
DotOrbit(Modifier.fillMaxSize(), spreading = 1.4f, speed = 1f)
Volumetric light rays radiating from an off-screen source, with bloom.
GodRays(
modifier: Modifier = Modifier,
colorBack: Color = GodRaysDefaults.ColorBack,
colorBloom: Color = GodRaysDefaults.ColorBloom,
colors: List<Color> = GodRaysDefaults.Colors,
density: Float = 0.3f,
spotty: Float = 0.3f,
midSize: Float = 0.2f,
midIntensity: Float = 0.4f,
intensity: Float = 0.8f,
bloom: Float = 0.4f,
speed: Float = 0.75f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object.copy(offsetY = -0.55f),
)
GodRays(Modifier.fillMaxSize(), intensity = 1f, bloom = 0.6f)
Soft multi-color gradient with configurable grain and shape.
GrainGradient(
modifier: Modifier = Modifier,
colorBack: Color = GrainGradientDefaults.ColorBack,
colors: List<Color> = GrainGradientDefaults.Colors,
softness: Float = 0.5f,
intensity: Float = 0.5f,
noise: Float = 0.25f,
shape: GrainGradientShape = GrainGradientShape.Corners,
speed: Float = 1f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object,
)
GrainGradient(Modifier.fillMaxSize(), shape = GrainGradientShape.Blob, noise = 0.4f)
Flowing spots of color moving on organic trajectories — the classic animated mesh gradient. Accepts up to 10 colors.
MeshGradient(
modifier: Modifier = Modifier,
colors: List<Color> = MeshGradientDefaults.Colors,
distortion: Float = 0.8f,
swirl: Float = 0.1f,
grainMixer: Float = 0f,
grainOverlay: Float = 0f,
speed: Float = 1f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object,
)
MeshGradient(
modifier = Modifier.fillMaxSize(),
colors = listOf(
Color(0xFFE0EAFF), Color(0xFF241D9A), Color(0xFFF75092), Color(0xFF9F50D3),
),
swirl = 0.3f,
speed = 1f,
)
Merging, gooey blobs.
Metaballs(
modifier: Modifier = Modifier,
colorBack: Color = MetaballsDefaults.ColorBack,
colors: List<Color> = MetaballsDefaults.Colors,
count: Float = 10f,
size: Float = 0.83f,
speed: Float = 1f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object,
)
Metaballs(Modifier.fillMaxSize(), count = 6f, size = 1f)
Electric neural-network-like filaments.
NeuroNoise(
modifier: Modifier = Modifier,
colorFront: Color = NeuroNoiseDefaults.ColorFront,
colorMid: Color = NeuroNoiseDefaults.ColorMid,
colorBack: Color = NeuroNoiseDefaults.ColorBack,
brightness: Float = 0.05f,
contrast: Float = 0.3f,
speed: Float = 1f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Pattern,
)
NeuroNoise(Modifier.fillMaxSize(), contrast = 0.5f)
Classic Perlin fractal noise between two colors.
PerlinNoise(
modifier: Modifier = Modifier,
colorFront: Color = PerlinNoiseDefaults.ColorFront,
colorBack: Color = PerlinNoiseDefaults.ColorBack,
proportion: Float = 0.35f,
softness: Float = 0.1f,
octaveCount: Int = 1,
persistence: Float = 1f,
lacunarity: Float = 1.5f,
speed: Float = 0.5f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Pattern,
)
PerlinNoise(Modifier.fillMaxSize(), octaveCount = 3, persistence = 0.6f)
An animated glowing border — great around cards or screens.
PulsingBorder(
modifier: Modifier = Modifier,
colorBack: Color = PulsingBorderDefaults.ColorBack,
colors: List<Color> = PulsingBorderDefaults.Colors,
roundness: Float = 0.25f,
thickness: Float = 0.1f,
marginLeft: Float = 0f,
marginRight: Float = 0f,
marginTop: Float = 0f,
marginBottom: Float = 0f,
aspectRatio: PulsingBorderAspectRatio = PulsingBorderAspectRatio.Auto,
softness: Float = 0.75f,
intensity: Float = 0.2f,
bloom: Float = 0.25f,
spots: Int = 5,
spotSize: Float = 0.5f,
pulse: Float = 0.25f,
smoke: Float = 0.3f,
smokeSize: Float = 0.6f,
speed: Float = 1f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object.copy(scale = 0.6f),
)
Box {
content()
PulsingBorder(Modifier.matchParentSize(), thickness = 0.15f, intensity = 0.4f)
}
Banded simplex noise cycling through a color list.
SimplexNoise(
modifier: Modifier = Modifier,
colors: List<Color> = SimplexNoiseDefaults.Colors,
stepsPerColor: Int = 2,
softness: Float = 0f,
speed: Float = 0.5f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Pattern.copy(scale = 0.6f),
)
SimplexNoise(Modifier.fillMaxSize(), softness = 0.5f, stepsPerColor = 4)
A turbulent ring of smoke.
SmokeRing(
modifier: Modifier = Modifier,
colorBack: Color = SmokeRingDefaults.ColorBack,
colors: List<Color> = SmokeRingDefaults.Colors,
noiseScale: Float = 3f,
noiseIterations: Int = 8,
radius: Float = 0.25f,
thickness: Float = 0.65f,
innerShape: Float = 0.7f,
speed: Float = 0.5f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object.copy(scale = 0.8f),
)
SmokeRing(Modifier.fillMaxSize(), thickness = 0.8f, radius = 0.3f)
A rotating spiral of strokes.
Spiral(
modifier: Modifier = Modifier,
colorBack: Color = SpiralDefaults.ColorBack,
colorFront: Color = SpiralDefaults.ColorFront,
density: Float = 1f,
distortion: Float = 0f,
strokeWidth: Float = 0.5f,
strokeTaper: Float = 0f,
strokeCap: Float = 0f,
noise: Float = 0f,
noiseFrequency: Float = 0f,
softness: Float = 0f,
speed: Float = 1f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Pattern,
)
Spiral(Modifier.fillMaxSize(), density = 1.5f, strokeWidth = 0.4f)
A still (non-animated) mesh gradient — zero per-frame cost.
StaticMeshGradient(
modifier: Modifier = Modifier,
colors: List<Color> = StaticMeshGradientDefaults.Colors,
positions: Float = 2f,
waveX: Float = 1f,
waveXShift: Float = 0.6f,
waveY: Float = 1f,
waveYShift: Float = 0.21f,
mixing: Float = 0.93f,
grainMixer: Float = 0f,
grainOverlay: Float = 0f,
sizing: SizingParams = SizingParams.Object.copy(rotation = 270f),
)
StaticMeshGradient(Modifier.fillMaxSize()) // perfect as a cheap wallpaper/background
A still radial gradient with focal control and optional edge distortion.
StaticRadialGradient(
modifier: Modifier = Modifier,
colorBack: Color = StaticRadialGradientDefaults.ColorBack,
colors: List<Color> = StaticRadialGradientDefaults.Colors,
radius: Float = 0.8f,
focalDistance: Float = 0.99f,
focalAngle: Float = 0f,
falloff: Float = 0.24f,
mixing: Float = 0.5f,
distortion: Float = 0f,
distortionShift: Float = 0f,
distortionFreq: Float = 12f,
grainMixer: Float = 0f,
grainOverlay: Float = 0f,
sizing: SizingParams = SizingParams.Object,
)
StaticRadialGradient(Modifier.fillMaxSize(), radius = 1f, falloff = 0.4f)
Concentric bands twisted around a center.
Swirl(
modifier: Modifier = Modifier,
colorBack: Color = SwirlDefaults.ColorBack,
colors: List<Color> = SwirlDefaults.Colors,
bandCount: Float = 4f,
twist: Float = 0.1f,
center: Float = 0.2f,
proportion: Float = 0.5f,
softness: Float = 0f,
noiseFrequency: Float = 0.4f,
noise: Float = 0.2f,
speed: Float = 0.32f,
startFrame: Float = 0f,
sizing: SizingParams = SizingParams.Object,
)
Swirl(Modifier.fillMaxSize(), bandCount = 6f, twist = 0.3f)
An animated Voronoi cell diagram with gaps and glow.
AndroidPoet/mirage is a public repo on GitHub by AndroidPoet. ✨ 29 ultra-fast, zero-dependency AGSL shaders for Jetpack Compose — animated gradients, noise fields, and image filters that run entirely on the GPU.
It declares the Apache-2.0 license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-07-05. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run mirage. What is known comes from GitHub. It declares the Apache-2.0 license on GitHub. Its last change was on 2026-07-05. It has 39 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.