The shader is very simple.
I created a black box and then colored all the areas in the corner of this box with black.
I left a white area to see the cross.
You can see better if you change this line of source code:
...into this:p_m = 1.0-p_m/(p_m+0.1);
or this:p_m = 1.0-p_m*10.0/(p_m*10.0+0.1);
The shader can be ru and testd here: