windows phone xna bitmap image issue

I'm making a game and I have a trouble:
I'm scaling the sptile with this method

spriteBatch.Draw(btn2, btn_pos, null, Color.White, 0, Vector2.Zero, scale, SpriteEffects.None, 0);

This code works well, but the sprite is blurred. How to pixelize it?

Upvotes: 0

Views: 78

Answers (1)

Daniel Johnson
Daniel Johnson

Reputation: 701

if you want it to be pixelized you have to specify that when you begin your spritebatch. by using PointClamp or PointWrap

spriteBatch.Begin(SpriteSortMode,BlendState,
    SamplerState.PointClamp,DepthStencilState,RasterizerState);

//or
spriteBatch.Begin(SpriteSortMode,BlendState,
    SamplerState.PointWrap,DepthStencilState,RasterizerState);

Upvotes: 1

Related Questions