New blog post: Anime-style action FX in Compose Mu...
# feed
o
New blog post: Anime-style action FX in Compose Multiplatform, no shaders, one codebase. It walks through building glowing slash ribbons, forked lightning, manga speed lines, particles and bloom in plain Compose, the same Kotlin on Android and iOS, with no shaders and no extra deps (CPU vector math plus Canvas, parse-once for 60fps, frame-identical across platforms). Real code for each effect. https://dev.to/solidkey/anime-style-action-fx-in-compose-multiplatform-no-shaders-one-codebase-2m6g (From our open-source KMPMedia library: https://github.com/SolidKeyAB/kmpmedia)
s
Why not use shaders?
o
Honestly, mostly to keep one codebase. The effects are just vector math (ribbons, bolts, particles), so in plain Kotlin the same code runs on Android and iOS, stays deterministic (identical on both, even exports a byte-identical GIF), and it's already 60fps. A shader would've meant maintaining AGSL + SkSL and an Android 13+ fallback, for no real gain here. (I do reach for the platform blur for real bloom in ogBloom, just opt-in since that one isn't identical across platforms.)
t
Screenshots/Gifs to showcase the effects would be pretty cool, so that I don't have to either try them myself or download the demo code and run it to know what it looks like :)
o
Good timing :) just added a full effect gallery with animated GIFs to the README, so you can see everything without running the demo: https://github.com/SolidKeyAB/kmpmedia#see-it-running--the-demo-app Particles, slash, action-fx, audio-reactive, looks, styles, bloom, compositor, and more, several shown on Android and iOS side by side.
👍 1