This is kind of softer shadow for unity indie(free), for directional light only.
(using modified AutoLight.cginc)
Still needs help to make it work without editing any .cginc files
(also no documentation yet, just check the included AutoLight.cginc to see what is happening…)
Hi guys, I am the one who started all this, and mgear was one of the ones who came to my aid. so here’s my result also, after working out some projection bugs (this is from my upcoming fighting game Knuckle Iron):2017 edit: Such game has been in hiatus for a very long time.
If you look closely, you will notice there is absolutely no pixilation on the shadow whatsoever, and this is on medium resolution with no cascades! (shadow distance is also 50, giving this a good deal of detail)
@mgear : if you wish, I can incorporate these changes as a secondary technique. (i found your technique had some weird graphics discontinuities, of which with mine, they are less obvious.)
everyone: also, like mgear said, if you have any ideas on improving filtering, please let us know!
No, unfortunately… to do it, we would need to find a way of accessing the shadow map in a custom shader. but unless mr. shadow softener figured out something not documented, we are stuck…
BTW, here’s a modified .cginc from me. (attached to post)
I would recommend this for mine: make the resolution as low as you want to, and it will blur in the pixels. at least that’s how it went with me…
EDIT: Also, unless something in your game needs it to work right, try turning off cascades altogether. this will improve the blurring as the shadow map will switch to a lower resolution.
If you get good projection, try to do some poisson disk blur, it gives a good soft shadow, i tried myself to do it in screen space it looks good but there is haloing.
Here you go. Where I went to find sampling techniques.
I actually got a pretty good result from both the one here and mgear’s code, but mgears only works in DX11. (for some reason, there is a EXTREME amount of ‘fragment noise’ when I switched to DX9. this doesn’t happen on the former from the URL, or on the other filtering type.)
EDIT: I fixed it, it turns out mgears were using floats, and trying to squeeze that into a half definitely won’t work… I will post a screen soon
EDIT2: another note: this sadly won’t work on mobile, all it does is mess up the projection. this only happens on the mobile device itself, it doesn’t show up on PC.
Nice work, thought that the hard shadows can’t be modified, turns out you did it! BTW since this is soft shadowing you should do some PCF filtering (Percentage - Close - Filtering).