My shadows are working with a own comparison function. The problem is that I can't use the hardware PCF with that emulation.
And I don't know why the shadow2D() returns the value from the shadowmap instead the comparison with the 3rd value.
That are dualparabolic shadows rendered with 16x AA and two shadowsamples per fragment (efective 8 samples per lightsource, because the 16x MSAA includes a 4x SSAA). With hardware PCF I could get 16 samples per pixel with only one lookup per fragment. (PS: 5 lights are switched off)