I am using UProceduralMeshComponent to create walls at run time. Once they are created they remain static. When I look at my GPU profiling, I’m seeing that during the BasePass, these procedural meshes are being rendered in a Dynamic pass after the Static pass of all my other world elements. This means that my procedural wall meshes are not occluding anything behind them. The pixels are drawn twice.
Below is a couple RenderDoc captures. On the left you can see the static pass, with lots of tree elements off in the distance. On the right is the Dynamic pass which happens later which fills in the spaces, thus wasting all those background draw calls.
This is very wasteful. Is there some way I can have my procedural mesh rendered during the static pass with all the other world elements such that those wall sections can occlude the background elements. I need that GPU performance boost! Thank you.