Using a mask to create custom hexagon terrain tiles

Here is what I’ve got so far. I am trying to display the first 5 hexagons from the big texture on the 5 individual hexagon shapes. I have not done this before, but I have heard that it can be done and I always learn something from these new challenges.

As you can see, there two problems with the textures displayed in the hexagons:

  1. It seems to be displaying the same texture. I probably need to clear out the canvas. Or perhaps something to force the program to wait until each new texture is loaded.
  2. The textures appear rotated by either 30, 60 or 90 degrees (it is hard to tell with these particular hex materials). I thought it might be because I was using a cylinder geometry to create the hexagon and rotating that geometry. But I am only rotating the cylinder upright by 90 degrees (and not rotating the cylinder does not make a difference.). I will add some marking to the first 5 hexagons in the big texture so that I can see how much it is rotated.

Any suggestions are much appreciated.

UPDATE
I have revised the program to do what it appears that you would want - to store the texture variations and to create a reference so that the correct texture is associated with each hex.

I also created a new text texture. This shows that the materials are rotated 90 degrees and that only the last material is being displayed.

I realize that what I am doing is slightly different than what you want to do - I have put 4 color textures in the big image while you want to have a color, roughness and bump map. But the same principles should apply.