A high-performance, real-time AGSL, SkSL, and Pure Canvas shader engine for Jetpack Compose Multiplatform.
Empowers Compose developers to craft GPU-accelerated visual effects, dual-input screen transitions, procedural generative art, and optical lenses across Android, Desktop (JVM), iOS, and Web (Wasm/JS) with a unified, zero-recomposition declarative API.
- ⚡ Dual-Tier Graphics Architecture:
- Hardware Tier (Android 13+ / Desktop Skia): Direct GPU fragment shader execution using AGSL and SkSL (
RuntimeShader/RuntimeEffect). - Pure Canvas Tier (Android 5.0+ API 21, iOS, Web): 100% shader-free mathematical emulation using Compose
DrawScope, 2D triangle mesh deformation (drawVertices), 2.5D perspective scaling, and channel-isolationColorMatrixfilters.
- Hardware Tier (Android 13+ / Desktop Skia): Direct GPU fragment shader execution using AGSL and SkSL (
- 🎨 Unified Declarative API: Use
Modifier.generativeShaderCanvas(controller)andShaderTransitionLayoutwithout managing low-level render passes or JNI bindings. - 🚀 Zero-Recomposition Snapshot Pipeline: Captures live Composable hierarchies into hardware
GraphicsLayersurfaces and pumps GPU uniforms every frame without triggering Compose recomposition passes. - 🎛️ Dual-Input Transition Layouts: High-performance transitions with interactive horizontal drag scrubbing and spring snap physics.
- 📦 Multiplatform Ready: Supports Android (API 21+), Desktop JVM (macOS, Linux, Windows), iOS, and Web (Wasm/JS).
Add the dependency to your module's build.gradle.kts:
dependencies {
implementation("pro.jayeshseth.shaderengine:compose-shader-engine:1.0.0-alpha01")
}// 1. Declare your AGSL / SkSL shader
val MyShader = """
uniform float2 resolution;
uniform float time;
uniform float progress;
half4 main(float2 fragCoord) {
float2 uv = fragCoord / resolution;
return half4(uv.x, uv.y, sin(time) * 0.5 + 0.5, 1.0);
}
"""
// 2. Drive it with ShaderController in Compose
@Composable
fun ShaderDemoScreen() {
val controller = rememberShaderController(MyShader)
Box(
modifier = Modifier
.fillMaxSize()
.generativeShaderCanvas(controller) {
float("progress", 0.5f)
}
)
}| Home | Transitions (Water Droplets) | Canvas (Quantum Core 3D) | Content (Liquid Glass) | About |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Home | Transitions (Water Droplets) | Canvas (Quantum Core 3D) | Content (Liquid Glass) | About |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Home | Transitions (Water Droplets) | Canvas (Quantum Core 3D) | Content (Liquid Glass) | About |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Platform | Graphics Engine | Tier Support |
|---|---|---|
| Android (API 33+) | Hardware AGSL (RuntimeShader) |
Full Hardware Tier + Pure Canvas |
| Android (API 21–32) | Compose DrawScope & Skia Canvas |
Pure Canvas Tier (drawVertices) |
| Desktop (macOS/Win/Linux) | Skiko / Skia RuntimeEffect |
Full Hardware Tier + Pure Canvas |
| iOS / Web (Wasm & JS) | Skiko / Canvas Rendering | Pure Canvas Tier |
See ROADMAP.md for milestone goals and planned features.
Copyright 2026 Jayesh Seth (MadFlasher)
Licensed under the Apache License, Version 2.0.















