Rendering Black&White Mask Pass

The SceneTexture:PostProcessInput0 is what you’d normally see through the virtual camera, in color. Since you just want a black white mask you don’t need to pull this through the calculation.
instead the A on the Lerp node could be a Vector3 (0,0,0) for black, while B is white.
Further , the Alpha value must be a value between 0 and 1. any number in between results in a shade of gray. You can use the math node “Round” before the Alpha input of the Lerp.

*Besides that, it would be compression if you export it as an image.