Back to Filament

maxPenumbraRatio

docs/android/dokka/filament-android/com.google.android.filament/-light-manager/-shadow-options/max-penumbra-ratio.md

1.75.01.2 KB
Original Source

//filament-android/com.google.android.filament/LightManager/ShadowOptions/maxPenumbraRatio

maxPenumbraRatio

[main]
open var maxPenumbraRatio: Float

Sets a light-specific maximum geometric ratio applied to Percentage-Closer Soft Shadows (PCSS), overriding the global default. In PCSS, overlapping occluders (like complex light fixtures) can cause the shadow map's 2.5D depth limitations to calculate an artificially close blocker depth. This drives the geometric ratio toward infinity, resulting in unnatural, massive "ghost" shadows. This parameter allows you to clamp the geometric ratio for this specific light, fixing geometric artifacts caused by layered occluders without compromising the soft shadows of other lights in the scene. The maximum penumbra ratio. Setting this to a value <= 0.0f disables the override and reverts the light to using the global default.

See also

View.SoftShadowOptions