I am working on a project with a locked camera perspective with a slightly angled topdown view. A sort of action exploration click to move click to move game.
I have a simple DirectionalLight with a ShadowGenerator creating shadows.
I notice that offscreen meshes are getting culled automatically and my draw calls do decrease based on their bounding boxes and the view frustrum.
But the offscreen meshes are still getting drawn again for the shadow map and included in it.
Is there any built in way to exclude non-drawn offscreen meshes from casting shadows?
I know I can compare them all by distance and disable them manually but I thought there may already be some option/setting I am missing!
Please let me know if you need me to make a playground example.
Not sure isInFrustum will be the bottleneck, but the best way to know is to check. If your camera / meshes don’t move often, only updating the list when they do could be worthwhile. But I would not make any of these optimizations first and see if they are really needed after testing.