I am trying to make procedural textures in my XNA 4.0 game, mainly for buttons, but also for other textures. Here is an image describing what I want:

I hope you understand what I want to do, if you do not, there are a few words: I want to create objects in my game. These objects will use the same texture, but can be changed and their texture will not be changed, so the pixels will be โstretchedโ, but will be placed in the procedure.
source share