Unlike LUT.fx, UIMask.fx doesn't let you define a .png of your choosing as the texture source.
I fixed this by adding
#ifndef maskSource
#define maskSource "UIMask.png"
#endif
after the #include, and changed line 150 (after edit) from
texture tUIMask_Mask <source="UIMask.png";> { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format=TEXFORMAT; };
to
texture tUIMask_Mask <source=maskSource;> { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format=TEXFORMAT; };
With that, you can add
sourceMask="NAME_OF_MASK.png"
to the preprocessor definitions to choose a custom image file.
I feel this would be a good feature to include in the master shaders. It adds a simple new feature consistent with other shaders without losing any previous functionality.