I need to map texture to shape. Texture:
This is a example of shapes I need to map texture to:
Notice that each piece in mesh has exactly 4 point to map texture. Logic is pretty straight forward: Top center edge to top in mesh etc.
I found some methods on Graphics object like texture(...) however these methods cannot handle diamond texture properly..?
I found this method:
ShapeRenderer.texture(shape, image, generator)
Where generator is:
However I don't understand How It can be used to map the image to the shape.
How to use it? Is there other way?