Make a mesh mask

Is this actualiy possible? To mask pixels based on the complex collision of a mesh?