Black Overlay has transparent holes


I’m using following code to overlay a black material (fading out)

public void OnPostRender()
    { ...
GL.PushMatrix();
        GL.LoadOrtho();

        // activate the first shader pass (in this case we know it is the only pass)
        mat.SetPass(0);

        // draw a quad over whole screen
        GL.Begin(GL.QUADS);
        GL.Vertex3(0, 0, -99);
        GL.Vertex3(1, 0, -99);
        GL.Vertex3(1, 1, -99);
        GL.Vertex3(0, 1, -99);
        GL.End();

        GL.PopMatrix();
...}

The same camera is rendering some UI elements using transparency. The black layer respects this transparency and leaves a cut-out where the polygons of the UI elements are and I don’t understand why. Appreciate any insights. I’m using Sprites/Default Shader for the black overlay.

I’ve found a solution by using a custom shader with some settings I only half understand:

Blend Zero OneMinusSrcAlpha
Cull Off Lighting Off ZWrite Off ZTest Off ZClip Off

ZClip Off does not seem to matter, I will likely remove it as I don’t know what it does