finds.dev

mikepenz/HypnoticCanvas

A shader modifier for Compose Multiplatform / Jetpack Compose

View on GitHubHomepage ↗

★ 226KotlinApache-2.0updated Oct 2026

// the take

HypnoticCanvas is a Compose Multiplatform library that lets you drop animated SkSL/GLSL shader backgrounds behind your UI with a single Modifier.shaderBackground call. It's for Android/Desktop/iOS/Wasm Compose developers who want generative visuals — mesh gradients, lens distortions, audio-reactive ribbons — without writing their own RuntimeShader/uniform plumbing.

The Shader abstraction is genuinely useful: applyUniforms covers plain float uniforms, nested Compose shaders (setShaderUniform), image inputs (setTextureUniform), and raw packed-byte data textures (setDataTextureUniform) for things like audio waveforms/FFT, not just color knobs. It's real multiplatform rather than Android-with-stubs — Android, Desktop JVM, iOS and Wasm are all wired up, with a documented fallback Brush for Android below API 33 where RuntimeShader isn't available. It also tests its own marketing: the README showcase images are generated and verified by an actual Compose test (ReadmeArtTest.kt / verifyReadmeArt), so they can't silently rot out of sync with the shader code.

Most of the visually interesting shaders (BlackCherryCosmos, GoldenMagma, IceReflection, InkFlow, OilFlow, PurpleLiquid, RainbowWater, Stage) are CC BY-NC-SA 3.0 ports from ShaderToy bundled in the 'shaders' module — noncommercial only, and the provenance for at least one (BlackCherryCosmos2) is 'appears to be based on' rather than a confirmed chain, so anyone shipping a commercial app needs to read the license section carefully before using half the library's content. Shader rendering itself only works on Android API 33+; below that you silently get a static/transparent brush unless you supply your own fallback, which is a real gap if your app still supports API 23-32 devices. Data-texture uploads allocate a new GPU texture on every call by the library's own admission, and the audio example re-uploads every frame — fine for occasional use, a likely bottleneck if someone tries real-time 60fps audio visualization. It's also a young, single-maintainer project (226 stars); the CI/OpenSSF scorecard setup is solid, but there's no visible secondary maintainer if Mike Penz moves on.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
226
Forks
8
Language
Kotlin
License
Apache-2.0
Last commit
19 Oct 2026

// nearby

If HypnoticCanvas isn't quite it.

All repos →