How to to transform a polygon to its mirror image
Thanks in advance
Flip about any given axis by inverting the axis.
1 0 0 0 -1 0 0 0
0 1 0 0 --\ 0 1 0 0
0 0 1 0 --/ 0 0 1 0
0 0 0 1 0 0 0 1
This flips around the X axis.
To create the world matrix for the mirrored object, apply row-major matrices in the following order:
AboveMatrix * OriginalWorldMatrix * MirrorTranslateMatrix = MirrorWorldMatrix
Culling must be reversed when flipping a single axis (CW -> CCW and CCW -> CW).
L. Spiro
I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid
Thanks
Texture co-ordinates are interpolated any way, so if (u,v) sequence (0,0), (0,1), (1,1), (1,0) denotes the left-to-right texel ordering then (1,0), (1,1), (0,1), (0,0) denotes the right-to-left texel ordering. When the vertex positions are left as they are, then the image will be displayed mirrored over x.
EDIT: Notice that you can leave the vertex positions where they are and change the belonging texture co-ordinates as shown above, or else change the vertex positions (e.g. as shown by L. Spiro) the but without changing the value of belonging texture-cordinates. If you do both, i.e. mirror the positions and change the texture co-ordinates, then the resulting image will visually not change because you've mirrored forth and back.