Skip to content

Prismal AGSL v0.0.1

Choose a tag to compare

@styropyr0 styropyr0 released this 08 Aug 15:59
· 44 commits to master since this release

Prismal 0.0.1

PrismalAGSL is the first stable Compose release of Prismal: liquid glass for Jetpack Compose with AGSL refraction, RenderEffect blur, and automatic fallback on older devices.

This is the Compose successor to Prismal (OpenGL ES). The original View + OpenGL ES library remains available separately.


Highlights

  • Compose-first API - Modifier.drawPrismalGlass, composable components, and layer-backed PrismalBackdrop sources
  • Liquid glass pipeline - backdrop sampling, edge lens refraction, specular highlights, depth shadow/inset
  • Three automatic tiers - Legacy frost (API 25–30), RenderEffect blur (API 31–32), full AGSL liquid glass (API 33+)
  • Ready-made components - buttons, toggles, sliders, progress bars, gradient glass panels, iOS-style bottom tab bar with draggable selection droplet
  • Custom glass builder - PrismalLiquidGlass, prismalGlassEffects, and low-level effect helpers
  • Adaptive luminance - optional backdrop brightness sampling for dynamic blur and foreground contrast
  • JitPack publishing - com.github.styropyr0:PrismalAGSL:Prismal:1.0.0

Requirements

minSdk 25
compileSdk 37+ recommended
UI Jetpack Compose
Kotlin 2.x + Compose Compiler plugin

Installation

// settings.gradle.kts
maven(url = "https://jitpack.io")

// app/build.gradle.kts
implementation("com.github.styropyr0:PrismalAGSL:Prismal:1.0.0")

Enable the Compose compiler in your app module:

plugins {
    id("org.jetbrains.kotlin.plugin.compose")
}

What's included

Core API

  • Modifier.drawPrismalGlass / drawPlainPrismalGlass
  • PrismalGlassSurface
  • PrismalBackdrop - layer, canvas, merged, and wrapped sources
  • PrismalLiquidGlass preset and prismalGlassEffects helper
  • PrismalGlass platform capability checks

Effects

  • prismalBlur, prismalLens (refraction + chromatic aberration)
  • prismalGradientGlass
  • vibrancy, colorControls, custom AGSL shaders
  • Legacy frost overlay when backdrop blur is unavailable

Components

  • PrismalGlassButton
  • PrismalGlassToggle
  • PrismalGlassSlider
  • PrismalGlassProgressBar (determinate + indeterminate)
  • PrismalGradientGlassPanel
  • PrismalGlassBottomTabs + PrismalGlassBottomTab
  • LocalPrismalBottomTabHighlightedIndex for live tab highlight during droplet drag

Shapes

  • PrismalRoundedRectangle (continuous curvature)
  • PrismalCapsule

Interactive

  • PrismalPressRipple
  • PrismalSpringMotion

Migration from Prismal (OpenGL ES)

Original Prismal PrismalAGSL
View-based surfaces Compose modifiers & composables
OpenGL ES rendering AGSL + RenderEffect
Imperative setup rememberPrismalGlassLayer() + prismalGlassLayer()

Visual recipes (blur, refraction, vibrancy) are aligned with the original library where possible, but APIs are not drop-in replacements - this release targets new Compose projects or Compose migrations.


Demo app

The :app module in this repository is a catalog playground (not published to JitPack). It demonstrates grouped iOS-style screens, glass tuning in Settings, profile widget preview, and all public components.

./gradlew :app:installDebug

Links