# Flipping ID3DXSPRITE horizontally

## Recommended Posts

guillotine    126
how to flip a sprite in Direct3d using ID3DXSPRITE? I searched around the net and i found a very easy way in DX8, but that won't work in DX9. Also i have another question. I scaled the sprites and i noticed they look sligthly filtered, with a tiny grey area around the sprite. It's not a big deal, but i was wondering if it was possible to show them unfiltered or something.

##### Share on other sites
SiCrane    11839
Create an identity matrix and then modify the following two elements:
  new_matrix._11 = -1;  new_matrix._41 = sprite_width;

Then use it with ID3DXSprite::SetTransform(). If you've already had a transform set you'll need to multiply the old matrix by this matrix.