Negative values for "Shadow Filter Sharpen" break shadows

Shadow Filter Sharpen works as expected for values of 0 and higher, sharpening the shadow with higher values:

However when using negative values the shadows get inverted:

I would expect the following behaviour:

  • Negative sharpening blurs the shadow
  • If for technical reasons blurring is not possible, the value should be clamped to positive values

Tested in 4.6.1 and 4.7 preview 7, both give the same results.