Spot light shadow clipping early

After designing a new scene, ensuring fantastic quality, changing camera rendering to diferred, I’ve obtained shadows that look pretty cool. My spot light preferred distance is about 100. Downside, is that the shadows start at a minimum of 4 unity’s from the player, meaning anything you’re up close to is fully penetrated by the light. To add injury to insult, the shadows can half show on objects, which is clearly not something anyone would want. I find the shadows work pretty well so long as I run up to 10 unity distance spot lights, but that’s ridiculously short. I’ve scanned quality settings, camera rendering tricks, I simply can’t find a balance to get ranged spot light with good enough looking shadows.

[30687-screenshot+2014-08-09+19.12.32.png|30687]

I need some kind of middle ground, or solution to the shading problem. I really dislike penetrating flashlights, and a good real-time shadowed flashlight is always an eye catcher in games.

So, this has to do with the way the shadows work. They use a depth buffer, much like the camera’s depth settings. The difference is that the camera offers fields for both near and far clip planes, but the spotlight shadows only make available the far clip (called range), and generate a reasonable near clip (looks like about 0.045 x Range from my test).

I just tried playing with all the settings, even in debug mode, but I think this is just a limitation you have to live with, unfortunately. Unity does not appear to expose the near clip plane for shadow casting.

The only thing I can recommend is to use a two-light setup. Use a short in-focus one at all times, and if you can raycast past, say 6 units, then enable the far blurred one. Might make for a pretty cool effect now that I think of it.