Back to Filament

falloff

docs/android/dokka/filament-android/com.google.android.filament/-light-manager/-builder/falloff.md

1.75.01.1 KB
Original Source

//filament-android/com.google.android.filament/LightManager/Builder/falloff

falloff

[main]
open fun falloff(radius: Float): LightManager.Builder

Set the falloff distance for point lights and spot lights.

At the falloff distance, the light has no more effect on objects.

The falloff distance essentially defines a sphere of influence around the light, and therefore has an impact on performance. Larger falloffs might reduce performance significantly, especially when many lights are used.

Try to avoid having a large number of light's spheres of influence overlap.

The Light's falloff is ignored for directional lights (DIRECTIONAL or SUN)

Return

This Builder, for chaining calls.

Parameters

main

radiusFalloff distance in world units. Default is 1 meter.