title: With a UV layout, how can I best modify this function to access any part of my texture?
body: <p>I've been trying to reduce the code used in my voxel / planar terrain generator, and wrote this function in order to call every time I need to add a new set of UV's - representing four vertex in a texture map: </p>
  
  <pre><code>List&lt;Vector2&gt; _UVs(List&lt;Vector2&gt; UV, int x = 0, int y = 0)
  {
      List&lt;Vector2&gt; UVReturn = new List&lt;Vector2&gt;();
      UVReturn = UV;
  
      UVReturn.Add(new Vector2 (0f, 0f) * x);
      UVReturn.Add(new Vector2 (0.125f, 0) * y);
      UVReturn.Add(new Vector2 (0.125f, 1)* y);
      UVReturn.Add(new Vector2 (0f, 1f) * x); 
  
      return UVReturn;
  }
  </code></pre>
  
  <p>However, I can't seem to identify the exact spots to write in the modifiers, they seem to throw things off every time. I currently have a single row of 128x textures in a 1024 file. The UV layout for the moment seems exact, except for the multiplication. Remove that and it shows the first texture, perfectly. What ways can this be improved on? My goal would be to get it to where it could be used for any four vertex plane.</p>