![]() Instead you would use a texture array, meaning that your texcoords for each tile are in the 0.1 range and flipping becomes trivial. Alternatively, you can flip the texture on the CPU and just load it into OpenGL correctly In modern OpenGL and for your specific use case - equally sized tiles in a texture atlas - you have the option of not actually using a texture atlas at all. You're using a 4x4 matrix, so you just need to use the translation part of the matrix. ![]() To flip a texture, you need to divide by the size, multiply by -1, and add 1 to the result.
0 Comments
Leave a Reply. |