Edge

data class Edge(val width: Dp) : RefractionProfile

Refraction is strongest at the boundary and decays to zero over width.

Rounded corners use an optical radius 1.5 times the visible radius, capped at half the material's shortest side. Displacement is also capped at half that side. SurfaceProfile and GlassOptics.refractionHeightFraction continue to control lighting, independently of refraction.

In a merged cluster, a member's standalone weight falls below 1 once a neighbour is inside the container's merge distance. The rest of its response takes the Edge direction from the merged shape at its visible radius, not 1.5 times it, and blends the members' displacement caps.

width must be specified, finite, and non-negative. A zero width disables refraction, including its secondary detail pass. Simplified renderers may omit refraction entirely.

Constructors

Link copied to clipboard
constructor(width: Dp)

Properties

Link copied to clipboard
val width: Dp

Distance from the boundary over which refraction decays to zero.