I’m trying to create a basic voxel game world. I’m trying to follow up on the process created in this tutorial series by implementing some mesh optimization techniques. The one I’m trying on is the greedy mesh algorithm.
In mapping the texture to the mesh, I’m using the same 4x4 spritesheet the tutorial uses, but I’ve come across the problem. The way I understand it, the mesh uses the UV array to determine which portion of the spritesheet to actually project onto the mesh. So, for example, I were to assign a value range of 0,0 to 0.5,0.5 to the UV points, it would project the lower left corner across the entire quad, whereas using 0,0 to 2,2 would tile the whole texture in a 2x2 pattern.
What I’m trying to figure out is how to combine these two approaches, that is, to take only a particular tile on the spritesheet, but to tile it over quads that are larger than “unit size” (i.e. the width of a single block). I’ve thought of using separate images or materials for these quads, but those seem either difficult to manage or largely inefficient. Is there a better way to achieve this effect, perhaps something I am missing about the finer uses of the UV array that makes this possible?