I’d like a way to tell a movable light that it should use its shadow map but that it can (for now) stop re-rendering its shadow map.
I have a house environment with many switchable lights (controlled by lightswitches), and so you’d think stationary lights would be preferable to movable lights. However, in a realistic house environment, basically every light violates the max-of-4-overlapping-stationary-lights limitation, because their attenuation radii reach each other through walls:
So I don’t think I can use stationary lights for switchable lights in a residential environment like this.
The problem with movable lights, of course, is that they need to re-render shadow maps on every frame, which gets prohibitive once you have several of them on. Once I switch on 5-10 movable lights with shadow maps, my frame rates become unacceptable.
For most of my lights, I could “lock” the shadow map most of the time, and only have it re-render the shadow map when I know something dynamic is happening nearby (eg a nearby door opening and closing). The rest of the time, the lights could consult their shadow maps but not re-render them.
Is there any concept of locking and unlocking shadow map re-rendering? One of the big benefits of shadow maps historically is that they can (often) be reused from one frame to the next, and I’d love to take advantage of that in UE4.