Manually update extends of DirectionalLight once

To automatically update the extends of the directional light, you set light.autoUpdateExtends=true
But how would I be able to manually update the extends only once?
Something like light.updateExtends()

Tagging @Evgeni_Popov

Doing something like:

light.autoUpdateExtends = true;
light.getProjectionMatrix(undefined, renderList);
light.autoUpdateExtends = false;

should do it.

renderList is the list (array) of meshes that should be taken into account to compute the light extents.

1 Like