DefferedShadowPCF shadow offset

Just been playing with and trying to get the shadow to start on the edge of the geometry.

In the patch attached I’m raising each block thru the surface, you can see that the shadow looks like the object is sitting above the surface, but it’s actually penetrating it. Is there a way to tweak the shadow so it starts more closely to the edge of the geometry?

I think another result of this is that the shadow starts to appear after the geometry gets high enough to start casting it’s shadow, so the shadow “pops” up.

DefferedShadowPCF - (8.8 kB)

The Bias and far plane settings can help, also setting the depth buffer of the shadow map renderer to D32 might help, and increasing the shadow map size. But there are compromises with shadows, and I’ve not found a better way. I think the EMesh shadows work slightly better, but there are overheads to that, and I’ve still not got Emeshe to actually work without breaking the message plugin, then again havent tried it since the last node…
Performance/quality is a tricky balance…

hi cat, took me some time to get emeshe work properly, i think i used latest github versions of everything. Shadow matter aren’t easy, basically was browsing around for nice shadows, and imagine my disappointment when every next google page had an example even worse then previous…

here u go our example defferedshadow-dx11

I know that feeling Antokhio, I never venture further than that one for similar reasons! Yours looks pretty good thanks :)

Got it looking really good with that example, will get some video uploaded soon.