Using UV Cells to sample a Mask

Hi,

I’m a bit new, and stuck on a specific question regading UV cells and their application.

What I’ve done is I’ve aligned the UV’s in a 10x10 grid, and now I want to use this grid to sample a mask. I want cells overlapping the mask (fully or only partially) to be colored, while those that don’t return a value of 0.

Below some screenshots:

Expected result/goal:

I want to use this to basically pixelate the mask used in a way such that each pixel stays aligned to the defined grid (in this case 10x10).

Could this be done easily?

You can use the mask to lerp between your other part of the graph ( the squares ), and something else. But it’s not going to be pixely, because the mask a hard line.