Custom shadow angle for spot light having wrong wrap mode

When using custom shadow angle for spotLight I think the wrap mode for shadow texture is set to clamp, as you can see the shadow map get stretched over all of the illuminated are which looks really bad.


Normal:

Also, it only happens on two sides of the shadow map, other sides stay the same.

Although this could be beneficial in some cases like if there’s a wall or large object we know would be casting a shadow all along the area but we just want dynamic shadows to be limited to a small area in middle.

In the picture, you can see that if the object is above the shadow casting plane then it’s illuminated properly but the ground is shadowed.

So maybe you could provide this as an enum between different wrap modes (if it’s related to that) and change the default to not stretch the shadow :slight_smile:

Any updates on this?

Hello,

Thanks for reporting that issue, it’s being fixed with that PR: https://github.com/Unity-Technologies/Graphics/pull/5439.
It will be included in HDRP 12 and then backported to other versions later on.

1 Like