Sign in to follow this  
Cantos

My sprite is blurry?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this