Search Unity

[Unity 5] Shadow Softness Inversely Proportional to Resolution?

Discussion in 'General Graphics' started by ToMorning, Apr 8, 2015.

  1. ToMorning

    ToMorning

    Joined:
    Apr 8, 2015
    Posts:
    4
    After upgrading to Unity 5, I noticed that soft shadows become harder when I increase the shadow resolution in the quality settings. With a close fit and very high resolution, there seems to be no difference between hard and soft shadows. In these screenshots, I'm using a directional light with soft shadows and varying the shadow projection/resolution - all other settings are the same.

    shadow_resolution.png

    Is this intended behavior?

    I'd like to soften the shadows at high shadow resolutions, but so far I haven't found any settings that help. Can anyone point me in the right direction? I'm fine with using an external tool as long as it works with Unity 5.
     
  2. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    yep its intended. it uses the adjacent pixels and averages them together. this avoids the hard edge and removes the pixelated look. but it means the more pixels you have the less blurry your shadow becomes. its a really good technique thats used in most engines(luminous engine, unreal engine, etc...). the problem is that it really doesn't look good if you just widen the blur(see point and spot shadows for more info as they currently show the problem =<). the only way to fix that is to add more samples, by doing so drastically increasing the performance cost. i recommend writing a custom script to set shadow resolution based on a setting. so you can set the maximum resolution per light. basically using QualitySettings to decide what resolution setting to set a light to, based on a setting in the inspector. hope that helps!
     
    ThomasCreate likes this.
  3. ToMorning

    ToMorning

    Joined:
    Apr 8, 2015
    Posts:
    4
    Thanks for the reply. =) I've since done a bit more reading about PCF. It does make a lot of sense in 99% of cases, but since I'm playing with some weird NPR stuff, I think I fall into the rare 1% for whom the screenspace blur actually looked better - or at least closer to what I wanted. I think it's a shame that they didn't even leave the option to use the old implementation, but I imagine not many people would want it.