Jump to content
  • Advertisement
Sign in to follow this  
Cantos

My sprite is blurry?

This topic is 3893 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am doing a 2D game with ID3DXSprite but I have a problem with the way my sprites are being drawn. The one on the right is what it looks like in the sprite sheet, and the one on the left is a cropped screen shot of the game. I'm not scaling the sprite at all. In game, it's blurry and there is a gray outline around the edges. This is running windowed, but I made the backbuffer the same size as a GetClientRect. Is there a render state I can set to fix this?

Share this post


Link to post
Share on other sites
Advertisement
Try setting the texture filtering to point filtering, after calling Sprite.Begin(). This should help.
This is because the ID3DXSprite sets some states and it might not produce the results you want.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
Thank you, my sprites are pixel perfect now! :)


It was a combination of the texture filtering and my window being a couple of pixels smaller than I thought it was.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!