Skip to content

Releases: styropyr0/PrismalAGSL

Prismal AGSL v1.0.2

Choose a tag to compare

@styropyr0 styropyr0 released this 29 Aug 19:06

Changelog

All notable changes to Prismal are documented here. This project follows Semantic Versioning.

Added

  • PrismalGlassButton now exposes the full glass stack for tuning without wrapping it in a custom component: shape, refractionHeight, refractionAmount, brightness, saturation, chromaticAberration, depthEffect, useVibrancy, an effects override that replaces the built-in stack, specular / depthShadow / depthInset providers (pass null to disable a layer), nestedGlassSource, pressLift, contentPadding, horizontalArrangement, verticalAlignment, and an onDrawSurface hook applied after the tint and surfaceColor.
  • dropletShadow parameter on PrismalHorizontalSelector (both overloads) and PrismalRulerSelector to toggle the droplet's depth shadow.
  • README sections for the glass button parameters and the new selector toggle.

Changed

  • The droplet depth shadow in PrismalHorizontalSelector and PrismalRulerSelector is now off by default. Both components clip their contents, which turned the shadow into a visible centre-weighted box behind the ticks and labels. Set dropletShadow = true to restore the previous look.
  • PrismalRulerSelector invokes onValueChange whenever the value changes instead of comparing the last and current value.

All existing call sites keep compiling; the only behavioral change is the droplet shadow default.

Full Changelog: v1.0.1...v1.0.2

Prismal AGSL v1.0.1

Choose a tag to compare

@styropyr0 styropyr0 released this 13 Aug 15:50

All notable changes to PrismalAGSL are documented in this file.

[Unreleased]

[1.0.1] - 2026-08-13

Added

  • PrismalRulerSelector - measurement-style horizontal picker with a fixed liquid-glass droplet, scrolling tick marks, and the live value rendered inside the droplet (||||||| <value> |||||||).
  • Ruler selector catalog demo in the playground app (0-100 mm example).
  • Documentation for the ruler selector in README.md.

Changed

  • Kotlin 2.2+ is now required to consume the library (Compose Compiler / metadata compatibility).
  • PrismalHorizontalSelector - improved droplet refraction, visual depth, droplet padding API, and damped expand animation when switching items.
  • PrismalGlassBottomTabs - updated chromatic aberration and selection scale behavior.
  • Droplet width on the ruler selector is sized to the widest label in range (with tabular figures) to avoid resize jitter while sliding.

Fixed

  • Adaptive luminance performance issue.
  • Depth inset blur caching by resetting blur radius when appropriate.

Prismal AGSL v1.0.0

Choose a tag to compare

@styropyr0 styropyr0 released this 10 Aug 18:26

Prismal AGSL 1.0.0

Liquid glass components, progress bar rendering, and specular improvements.


Highlights

  • New: PrismalHorizontalSelector - iOS-style camera-mode picker with a fixed liquid-glass droplet, scrolling labels, spring snap, and configurable chromatic aberration
  • Progress bar track simplified - track background uses backdrop blur + alpha tint instead of edge refraction
  • Bottom tab specular control - PrismalGlassBottomTabs accepts a specular parameter
  • Nested glass sampling - LocalPrismalParentGlassLayer for components that sample a parent glass layer (slider, toggle)
  • Expanded specular styles - additional presets and playground specular-style picker support

Installation

implementation("com.github.styropyr0:PrismalAGSL:Prismal:1.0.0")

Added

PrismalHorizontalSelector

Horizontal selector with a centered liquid-glass capsule and scrolling items underneath.

  • Text overload - synchronous TextMeasurer sizing for string labels
  • Composable overload - arbitrary item content with one-time width measurement
  • Fixed droplet with lens refraction, specular, depth shadow, and spring snap on release
  • Focus animation - centered item scales up and fades in; side items shrink and dim
  • chromaticAberration - droplet RGB dispersion in [0, 1] (default 0.2 = 20%)
  • adaptiveLuminance / luminance - optional backdrop-driven frost and blur tuning
  • boldWhenFocused - text overload bolds the centered label (default true)
PrismalHorizontalSelector(
    labels = listOf("VIDEO", "PHOTO", "PORTRAIT"),
    selectedIndex = selectedIndex,
    onSelected = { selectedIndex = it },
    backdrop = backdrop,
    textStyle = MaterialTheme.typography.labelMedium,
    textColor = MaterialTheme.colorScheme.onSurface,
    chromaticAberration = 0.2f,
    modifier = Modifier.fillMaxWidth(),
)

LocalPrismalParentGlassLayer

Composition local for passing a parent PrismalGlassLayer into nested glass components so sliders and toggles can sample grouped glass surfaces correctly.


Changed

PrismalGlassProgressBar

  • Track background is now blur + alpha overlay only - refraction removed (no meaningful visual gain at 8dp track height)
  • New parameters:
    • blurRadius - backdrop blur radius (default 4.dp)
    • trackAlpha - tint overlay alpha (default 0.2 light / 0.36 dark)
    • trackTint - base neutral tint color (default #787880)
  • Vibrancy disabled on the track for a cleaner frosted appearance

PrismalGlassBottomTabs

  • Added specular parameter for custom specular highlights on the selection droplet

PrismalGlassSlider / PrismalGlassToggle

  • Read parent glass layer via LocalPrismalParentGlassLayer for improved backdrop sampling inside grouped glass containers

Specular

  • Extended PrismalSpecularStyle presets
  • Specular modifier outline generation fix for non-uniform shapes

Backdrop sampling

  • Glass layer modifier updates for more reliable coordinate sampling across window layers

Demo app (:app, not published)

The catalog playground received several updates alongside this release:

  • Horizontal selector demo on the Browse tab
  • iOS-style glass dropdown with morphing open/close animation
  • Alert dialogs and bottom sheet glass surfaces
  • Custom wallpaper picker with persistence across app restarts
  • Search bar animation and brightness control in Settings
  • Specular style picker in Settings
  • Updated tab icons and grouped UI polish
./gradlew :app:installDebug

Migration from 0.0.1

0.0.1 1.0.0
No horizontal selector Use PrismalHorizontalSelector for camera-mode / segmented pickers
Progress bar used refraction on track Same API; track is blur-only by default. Optional trackAlpha / blurRadius for tuning
Bottom tabs: fixed specular Pass specular = { PrismalSpecular.Default } or custom
Nested slider/toggle in glass groups Automatic when parent provides LocalPrismalParentGlassLayer

No breaking API removals in this release.

Links

Prismal AGSL v0.0.1

Choose a tag to compare

@styropyr0 styropyr0 released this 08 Aug 15:59

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