Use Camera/Window projection when texture painting? I am trying to paint a texture mask based on a certain camera angle. This texture will then be used with Window coordinates in the material nodes. However, in texture paint mode, its only possible to paint based on UV maps. I can set an image as a camera background image, but you can't paint on that.

If I paint in the Image Editor paint mode, then I can only see the single image I'm painting, and not the other things in the viewport I'm painting over, so its no good.

Is there anyway around this?
You can give your model a secondary UV map to base your mask on, using Project from View through your camera you have sized to match your mask image. Call up the mask image in the Masking tab either in the mask tool itself or in the Texture Paint tool, and invert as you need to.
Add your image to the image editor to see the scale and set up your camera to match.

Added a second UV mapping layer

Before painting, showing the original mapping active for target image

Here is the paint on top of the mask, holes showing through