Skip to content

ShaderX: GPU shader effects for Compose Multiplatform

ShaderX — a blue halftone flower, GPU shader effects for Kotlin and Compose Multiplatform

ShaderX is a Kotlin Multiplatform library for applying GPU shader effects to Compose UI. Use the same Kotlin API for Android's AGSL backend and the Skia backend on iOS, JVM desktop, and WebAssembly.

Start with grayscale, blur, gradients, or pixelation, then write a custom AGSL/SkSL shader when you need a different effect.

Get started Explore the effects Try the playground

See ShaderX in action

The sample gallery includes Android and WebAssembly ShaderLab recordings, a live ASCII camera, and a scroll-driven movie carousel, with source code and run commands for each.

For the project's background, read the companion article, Building GPU Shader Effects for Compose Multiplatform: From Scratch to ShaderX. Use these guides for the current API and platform limitations.

Start building

I want to… Start here
Add ShaderX to an app Installation and quickstart
Check my target platforms Platform support
Choose an effect Effect catalog
Animate effects or handle errors Compose integration
Write an AGSL/SkSL shader Custom effects
Process image bytes Image processing
Run an example Sample applications
Fix a setup problem Troubleshooting
Contribute a change Contributor guide

Release status

The published Maven Central version is 0.1.4. The installation examples and guides describe that release, including session animation, texture inputs, and all 15 built-in effects. The effect catalog distinguishes the nine effects already available in 0.1.3 from the six added in 0.1.4.

Check the 0.1.4 release notes for the changes and retain the documented platform limits. The repository and playground can include later source changes; build locally when testing a change that is not in your installed release.

Source and API reference

ShaderX was created by Debanshu Datta and is open source on GitHub under the Apache 2.0 license. Kotlin packages start with com.debanshu.shaderlab.shaderx; the Maven coordinates are io.github.debanshu777:shaderx.

Generate the full KDoc reference from your checkout:

./gradlew :shaderx:generateDocs

Open shaderx/build/dokka/html/index.html. See contributor setup for the required toolchain.