That is one way to do it with pseudo random noise (floating point rounding error and big numbers). If you only want 2D just feed Z a fixed value.
Just know that the results will vary depending on the floating point implementation of the architecture (CPU/GPU, Intel/AMD, etc) and the mode used (fast, precise, etc). For example, on my system the Cycles GPU and Eevee are close to each other, but not exact, and Cycles CPU is way different.
If you need predictable results use an image with pixel noise and filtering mode set to nearest. Yeah I know it’s not procedural but the results are often very acceptable for this purpose.
For 3D and no mortar, I’d do:
Object coords -> Mapping Add 10 -> Mapping Scale 10 -> Separate XYZ
Outputs are then fed through Math (Floor) and recombined with Combine XYZ.
Take this into Noise texture 42.5, 0, 42.5 and you have three channels (colors) at your disposal.
Beaten But hey, what’s in that unfiltered noise group?
BTW you guys can delete the abs node in that group. I forgot to delete it. It was a remnant from when blender did not give access to fract and I used modulo instead which would out negative values on negative input.
@moony: Yep, but then UV mapping is needed. I prefer it to be fully procedural.
I’ve tried the above procedural methods, and @CarlG’s method is the one that remains stable when you change the camera angle, which is what I need, because I have to use it in animation.