Hi everyone, I am currently working on a custom gpu culling inside unity, so far seems to work quite well performance wise, the issue comes from the cascade pass, currently in deferred mode.
Right now what is happening is that I do a frustum culling on gpu of some instanced geometry, then I do a GBufferPass and a per light shadow pass, the only thing I do for shadowing is adding to the commandBuffer beforeShadowMap event, the drawMeshInstancedIndirect.
That command gets duplicated four times, once per each cascade. the issue is that, there is way to much overdraw happening, for each cascade the whole visible frustum geometry gets submitted (the original geo submitted for the drawMeshInstancedIndirect).
Understandably unity cannot do the culling for me, it has no bounding boxes etc, but is there any way to hook up more granularly in the shadow pass, ideally one per cascade shadow?
I am looking for anything that will give me more control on the shadow rendering cascade, Ideally being able to do the culling for each cascade myself and let unity know which geometry to render per each cascade.
Is there a way to deal with this issue?