GlassOptics

data class GlassOptics(val refractionStrength: Float = 0.7f, val refractionHeightFraction: Float = 0.25f, val refractionDisplacement: Dp = 15.dp, val depth: OpticalSizeValue<Float> = OpticalSizeValue.Fixed(1f), val blurRadius: OpticalSizeValue<Dp> = OpticalSizeValue.Fixed(14.dp), val progressive: HazeProgressive? = null, val refractionFoldStrength: Float = 0.0f, val refractionDetailIntensity: Float = 0.76f)

The optical response used to render a Glass material.

depth and blurRadius resolve independently. OpticalSizeValue.Fixed applies one value at every material size. OpticalSizeValue.Responsive clamps to its first or last point outside the authored range and smoothly interpolates between adjacent points using the material's shortest dimension.

Responsive values require at least two points with positive, finite, strictly increasing dimensions. Invalid numeric values throw IllegalArgumentException during construction.

Constructors

Link copied to clipboard
constructor(refractionStrength: Float = 0.7f, refractionHeightFraction: Float = 0.25f, refractionDisplacement: Dp = 15.dp, depth: OpticalSizeValue<Float> = OpticalSizeValue.Fixed(1f), blurRadius: OpticalSizeValue<Dp> = OpticalSizeValue.Fixed(14.dp), progressive: HazeProgressive? = null, refractionFoldStrength: Float = 0.0f, refractionDetailIntensity: Float = 0.76f)

Properties

Link copied to clipboard

Maximum blur radius whose values must be specified, finite, and non-negative.

Link copied to clipboard

Depth perception factor whose values must be finite and in 0f..1f.

Link copied to clipboard

Optional progressive intensity, retaining the contract of HazeProgressive.

Link copied to clipboard

Finite intensity of secondary edge-refraction detail, in the inclusive range 0f..1f.

Link copied to clipboard

Specified, finite, non-negative maximum distance that refraction displaces content.

Link copied to clipboard

Finite strength of the inverted edge-refraction fold, in the inclusive range 0f..1f.

Link copied to clipboard

Finite fraction of the material's shortest side used by the refraction profile, in 0f..1f.

Link copied to clipboard

Finite refraction strength in the inclusive range 0f..1f.