Roating quads makes for one ugly sprite.

Started by
1 comment, last by Agony 19 years, 4 months ago
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.
Advertisement
Looks fine to me.
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.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke

This topic is closed to new replies.

Advertisement