Contact Shadows not rendering across the entire screen

I’m building a voxel engine and using the HDRP for the performance enhancements and just better effects in general. I’ve been having problems with light bleed when the sun is pointing at the back of a mesh, which is really bad in caves where I want it to be very dark. I’ve contemplated many fixes for this but most would cost render performance or have undesirable side effects.

I’ve found that contact shadows successfully fix the problem, but they have their own issue.

Here is an image with contact shadows off, in a cave with the sun at an extreme angle (sunrise).

and here is a screenshot with them on from the same angle:

You can see that they’re mostly gone, but there seems to be a “frame within the frame” effect here where contact shadows don’t render on the edges of the frame.

Here’s a screenshot from the editor window that more clearly shows the “frame within the frame”

Does anyone know what causes this or how to fix it? Is there a setting I can tweak to fix it? Ultimately I just want to fix the light bleed, if it cost a little extra performance to do so I’m ok with that, I’d just rather stay away from solutions like doubling up the mesh, which would significantly increase render load.

I Have same issue. Are you fix this?

Make sure you aren’t on high quality shadow filtering, I’ve seen artefacts like that before with it. It also seems like you might be self shadowing from a doublesided mesh, which is bound to have some issues. Definitely don’t try to hide it with a screen space effect like contact shadows, since they’re a bit unreliable, and by their very nature don’t work at the edges of the screen.

What object is casting the shadow and where is the receiver in relation?