Back to Filament

setDynamicLightingOptions

docs/android/dokka/filament-android/com.google.android.filament/-view/set-dynamic-lighting-options.md

1.75.01.3 KB
Original Source

//filament-android/com.google.android.filament/View/setDynamicLightingOptions

setDynamicLightingOptions

[main]
open fun setDynamicLightingOptions(zLightNear: Float, zLightFar: Float)

Sets options relative to dynamic lighting for this view.

Together zLightNear and zLightFar must be chosen so that the visible influence of lights is spread between these two values.

Parameters

main

zLightNearDistance from the camera where the lights are expected to shine. This parameter can affect performance and is useful because depending on the scene, lights that shine close to the camera may not be visible -- in this case, using a larger value can improve performance. e.g. when standing and looking straight, several meters of the ground isn't visible and if lights are expected to shine there, there is no point using a short zLightNear. (Default 5m).
zLightFarDistance from the camera after which lights are not expected to be visible. Similarly to zLightNear, setting this value properly can improve performance. (Default 100m).