Is it possible to change shadow detail?

I want to get shadows that are a lot less detailed and more soft in nature.

Sort of like this:


Is there any way to achieve this without reducing quality settings? I’ve tried doing some post processing effects to blur and dilate the edges of the shadows but that had little to no effect. Any files that I should look through in the source code to achieve this if post processing is not an option.

You might need to edit shadow filtering shader and increase filter size for this effect. Also consider looking at PCSS in version 4.17 and above ( r.ShadowFilterMethod 1 console command to enable it).

Hi Deathrey, so I played around with PCSS and its giving me a close intended effect, the only problem with it right now is that there’s too much noise on the shadows, is there anyway to mitigate it. I’m also using full dynamic lighting for my scene. I also tried playing around with Shadow BufferSize with the ShadowProjectionPixelShader.usf by multiplying it by a constant but that just scales and displaces the whole light map making it look extremely wonky.

Settings.ShadowBufferSize = ShadowBufferSize * filterScale;

Is this the wrong value or should I modify some other stuff?

In regards to PCSS, you might want to take a look at defines in ShadowPercentageCloserFiltering.ush

As for modifying conventional PCF shadow filtering, you would need to take a look at ShadowFilteringCommon.ush, ManualPCF function in particular and CubemapHardwarePCF function in ShadowProjectionCommon.ush. Do note however, that it might not be a full list of things you would need to tweak and overall, that it is pretty large undertaking and requires basic understanding of shader coding.

For your purpose, I think that implementing a disc-shaped filter would give better results, than using default box-shaped filter. You can find in-depth information about implementation in this article.

Also, keep in mind, that it is all dependent on the shadow map resolution, and sometimes just using a lower resolution shadow will help you.