Hi All!
I’ve been doing some digging around the forums trying to find somebody who’s found a solution to the problem where you cannot repeat textures across a single quad (using UV coordinates) where said texture comes from a texture atlas.
Cue fancy images to explain!
So in this example, I’m building tiles, one quad at a time, and texturing them from a single-image texture atlas by manipulating each quad’s UV texture coordinates.
So far, so good, but the above method of rendering the map geometry is inefficient.
So, cue image 2!
This time around, I’ve optimised the level geometry to combine quads that lie on the same row as one another. This makes the geometry three times more efficient, but I immediately fall into the trap I’ve raised this thread for.
From reading other forum posts, it seems impossible to repeat textures that have been ‘snipped’ from a texture atlas, so the above method of combining geometry wouldn’t work - I’d have to render a single, correctly-sized quad for every texture tile I want to place, making it tremendously inefficient.
What I’d like to know is whether or not anybody has solved this conundrum yet?
I can’t imagine that loading up a single image file for each texture tile is a better way around this - because even with an optimised texture binding order (to ensure each texture is only bound once for all geometry that uses it), I can see frames being chewed up and wasted by doing this.
I’m reaching out for some hands-on experience with this problem (and hopefully, a solution!).
Thanks all