Jump to content
  • Advertisement
Sign in to follow this  
Fatih Necdet Kasapo?lu

is there any option to select texture filtering for Xna

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

Why.png

gemi300dpi.png

guys im using a software called "Xna 4.0"

i draw a sprite on photoshop and original resolution is 1897 x 2664 300dpi..
im using a command for software, which it is scaling down my sprite.

[source]spriteBatch.Begin(SpriteSortMode.Immediate, null, null, null, null, null, Matrix.CreateScale(.04f, .04f, 1f));
spriteBatch.Draw(_ship, _shipRect,null, Color.White, 0, new Vector2(0,0), SpriteEffects.None, 1);
spriteBatch.End();[/source]

but i cant get a chrisp sprites on Xna.. i can even get a nice look on my windows folder biggrin.png (u can see on the picture)
is there any option to change that thing on Xna ? sorry for my bad engilish..

Thanks for advices.

Edited by actionman124

Share this post


Link to post
Share on other sites
Advertisement

Pass SamplerState.PointClamp or SamplerState.PointWrap for the third parameter in SpriteBatch.Begin.

Share this post


Link to post
Share on other sites

I can't really improve on Phil's answer, though I would like to raise a potential issue you may come across. Although most modern computers now days support textures up to the region of 8192x8192, there are a frightful number of people who are still limited to 2048x2048, especially old cards that support XNA's target platform DirectX 9.0c.

 

It's not a huge issue and and I only offer it as advice, but if it was me I'd question weather going above 2048x2048 was worth it considering id be stopping some people from playing my game.

 

All the best!

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!