Jump to content
  • Advertisement
Sign in to follow this  
GroZZleR

Roating quads makes for one ugly sprite.

This topic is 5041 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

Hey all, I've setup an orthographic projection matrix, and am rendering my 2D quad by transforming it using the D3DXMatrix library of functions. When I rotate the quad, I end up with one disgusting sprite: I'll be happy to supply relevant code, but I'm not sure where / what would be causing this. Is this a mipmap issue? Please note: The actual quad is rotating, not the sprite image itself.

Share this post


Link to post
Share on other sites
Advertisement
SetSamplerState(D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
SetSamplerState(D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
One (or both) of those might help. Default is D3DTEXF_POINT, which just grabs the nearest point from the sprite. D3DTEXF_LINEAR does bilinear filtering, by averaging texels from the sprite, when screen pixels and sprite texels don't match up exactly, as is the case when rotating.

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!