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.