How do I flip a texture in modern OpenGL (3.1+)?
This is the unflipped render, keep in mind it is drawn with 8x8 tiles from a texture atlas, so I edited green squares below him into the image to represent it. Rendered without horizontal flip:
I have tried doing 1-texCoord.x
in my vec2 texCoord in my vertex shader.
It gave me... this result:
This is how texture atlas is laid out, if it matters:
Attempting other methods such as inverting texture coordinates of the VBO gave me similarly garbled results. What should I actually be doing, to flip the texture, or more accurately each individual tile? I know I would also have to change each tile's coordinates, but that's for after.