Is there a good shadow volume solution for Unity 5.6 + DirectX10?

I’m not really a fan of the inbuilt shadows in Unity. Is there a good shadow volume solution for Unity 5.6 and DirectX 10? I know it uses the stencil buffer.

Doom had it, and that was a really old game:


But all I see in Unity are the kind of pixelly shadows.
I’d like to find a solution that doesn’t require DirectX 11. I’m not going for realism.

This is very good shadows
But Direct 11 need it. Also thing like this but it’s a cheat

It was stensil shadows in asset store long time ago but it’s obsolete now

Stencil shadows are a bit old-school. ID is one of the few that kept using it for quite a while. It should be possible to create stencil shadows in Unity, but there are some pro’s and con’s:

Pro:

  • Perfectly sharp shadows
  • MSAA works on stencil shadows out of the box

Con:

  • No support for transparency
  • All models need to be adjusted to cast volume shadows (Model should be made “stretchable”.)
  • A full set of adjusted shaders is needed
  • A lot of tweaking to get a good performance. A stretched model can cause a lot of overdraw, so you want to keep the amount of stretching as low as possible depending on the position and size of an object.
1 Like