Which shadow technology are you using? Virtual Shadow Maps or the older cascade shadows?
My previous one was using VSM, which was what I believe it defaulted to. I just tried again with standard cascade shadow maps and the result was the same (recording eats some perf but it’s the same effect). Disabled occlusion culling for this one as well and it didn’t fix anything.
Also for anyone else trying this, attached is a text file of the entire scene. You can create a blank map and copy the text and paste it straight into the map to recreate exactly what I have. It’s just:
For context, this all came up another guy on our team had a level blocked out using the Blockout Tools plugin content and performance tanked when switching to 5.1. It was tied to shadows and where the camera was looking, although in unexpected ways (like really poor performance when looking at the empty horizon).
Does this occur when the cubes are not stacked? As in, is this actually a practical problem? Regardless, definitely seems like something you should report as a bug
Try “r.LumenScene.DirectLighting.OffscreenShadowing.TraceMeshSDFs=0”. It’s hard to make a render pipeline that can handle anything you throw at it in what ever form you like. A feature becomes a bug so easily.
Since this thread has popped up again, I wonder if the reason this was happening was because of the efficiency of screen tracing. When the mesh is off screen, it has to resort to ray tracing, and tracing 4000 objects is a bit expensive. When it’s on screen, it can skip raytracing and rely on the screen traces which are pixel bound, not instance bound.
You can validate this by disabling screen traces to see if the performance is more uniform.