Rendering Black&White Mask Pass


i’m rendering a black and white mask pass with postprocess material. I need the mask to be binary, either 0 or 255, but it seems to have a bit of noise in-between. Is it because of the jpg compression or is it a matter of some settings?

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.