There are several actors which do complex work that only needs to be done when they have an effect on the screen. We can detect if an actor is in the camera view frustum and disable it when it’s not.
However, an off-screen actor may be in the view frustum of a shadow casting light and the shadows on the screen should reflect the actor’s state.
Is there a way to detect if an actor is contributing to on-screen shadows?
Tha’ts a good question.. I don’t know of a way to do that directly, however, ultimately the shadow is just a projection from an angle. Discarding occlusion & discarding surface checks, if you have a limited amount of shadow-casting lights, you could simply draw a trapeze with the top and bottom point of your actor, that represents the “path” of the shadow from the actor to potential surfaces (once per shadow casting light), and see if any of these “projections” intersects the view frustrum.
I would also take a step back and worry about this whole idea of manually culling actors outside the view frustrum. This should be something that’s handled by the engine already. Everything you need may well be done by the engine already, with only CVars (or actor variables) to adjust to your liking.