I thought you might find this file useful:
https://pasteall.org/blend/67ddee8e990846dab313c97734adc6ee
It allows you to:
- Use a texture of any size, as long as the tiles are constant.
- Randomize each tile based on the given index.
- Randomize rotation of each tile. (Works best with square aspect ratios.)
- Use a custom ID for randomization. (such as mesh islands)
Make sure to set the texture’s X and Y tile count in the node to ensure the uvs are mapped properly.
The test texture is by PamNawi on opengameart.org.
Thanks to @higgsas for help with the UV squares group!