So 5.0 beta9 added PCF 5x5 filtering for directional light shadows (option under quality settings). That typically looks nice, and actually runs faster than the old screenspace blur filtering. However, it leads to more self-shadowing artifacts (“shadow acne”).
5.0 beta 17 (out today) adds so called “normal offset bias” to help with this. It’s a setting on the Light; typically values of 0.3-0.7 look good (default is still zero, will change that later).
Now, feedback we’re looking for is: Does anyone need the old screenspace shadow blur method?
Advantages of the new PCF 5x5:
Faster (my measurements, 30% faster; checked on Intel Iris Pro and GeForce GTX 680)
Shadows look nicer in many cases (less noise, less “wrong shadows around some object corners”)
Advantages of the old screenspace blur method:
“shadow softness” control on the light that spreads filter taps around. This is not easily possible in PCF 5x5 filter case.
Transition between shadow cascades is less visible
Smaller shadow bias is enough (i.e. less shadow acne).
If anyone thinks we should keep the old screen space blur - we’d love to know the reasons why!
(current plan is to remove screenspace shadow blur for Unity 5.0; it will be replaced with PCF 5x5 filtering)
I have tested new filter. I have no idea about technique but it is much more better. I didn’t see any transition visible between cascades. For me, no reason to keep older one if PCF 5x5 filtering is better for both performance and look nicer.
the old method looked so terribly noisy that i wouldn’t shed a tear if it vanished. one thing i wonder about is exposure of the shadow system? i’d like to see what the community could do with an extendable shadowing system. but i understand thats a lot to ask. =3
I’d say say… remove it? Besides getting rid of the noise, my selfish reason would be it should make it easier for me to implement penumbra scattering in my skin shader with less #ifdefs. Or so I’d like to say, but I’ll have to support Unity 4 for a while anyway.
Here’s what I meant by penumbra scattering, and a shameless plug:
Yeah, eventually it would be awesome to have it. Currently you can do quite a lot (e.g. Shadow Softener which works in Unity 3, 4 and 5), but having more extensibility would be awesome. Someday.
How about a bool flag on objects that would turn Self Shadow on/off? This is common in 3D applications. Some objects don’t need self shadowing whatsoever, artifacts could be lessened on problematic objects and rendering would be even faster in general. Just my 2 cents.
That’s a bit hard to do with shadow maps (since presumably you want to receive shadows from other objects, but not from the object itself; but also want the object to cast shadows onto other objects)…
I understand your concerns, but… some organic objects (like a human face) can have really bad shadow artifacts. Another solution could be the perfect shadow, but it seems even harder to achieve. Programmingwise, is it possible to automatically increase shadow quality as the camera gets closer to objects? (and decrease it as it moves farther)
No problems here on DarkfieldVR with 5x5 PCF, except the usuale ones with flickering on very near shadows (near clip plane 0,1), but this is not filtering related. You can dump the old method for our part.
Those weren’t just concerns. Those are limitations of the algorithm. Unless you want to be rendering a ton of separate shadow maps, you just can’t have an object selectively shadowed by other objects and not itself.
im more curious when the point and spot lights will have the ability to have nicer soft shadows. Mind boggling how they still look like 4 combined hard shadows shifted over each other.
That’s high on the list, but most likely not for 5.0. (and yes, point/spot lights do exactly four shadow taps and average the results)
For now, you can work around that locally by adding a custom version of AutoLight.cginc next to your shaders, that do more shadowmap taps. Or get something like Shadow Softener from the asset store to do that for you.