Mirror Texture

Started by
1 comment, last by 3TATUK2 10 years, 7 months ago

What is the best/good way to deal with mirrored textures?

Most questions I've found about it suggest to either invert the texture pixels before uploading to the card, or invert the UV coordinates of it.

The problem with inverting the UV coordinates (the way I'm tempted to do) is that I would need to create the VBO for UVs x 4 for all textures I'm going to use to be able to adjust for: normal, vertical mirrored, horizontal mirrored, vertical and horizontal mirrored. (I can use the same VBO but it's still UVs count x 4)

At first I thought I could just invert the order I draw the vertices of my quad but it didn't work, is there an elegant way to deal with this?

Advertisement

In most cases it's best to invert the texture pixels when loading. That way everything else stays consistent.

Or save your textures the way you want them in the first place...

scale the projection matrix by -1 on the axis you want flipped

This topic is closed to new replies.

Advertisement