I want my game to have old-school graphics. and i figure the easiest way would be to create the sprites in 8-bit and scale it up.
But how do i scale it without it going all blurry?
i'm working in visual studio 2010 c#.
Jump to content
Posted 12 March 2013 - 08:35 AM
Are you using XNA?
I did a quick search on google "xna texture filtering" and this seems to be your answer:
You need to set the sampler state. The default for SpriteBatch is SamplerState.LinearClamp (ie: linear interpolation - the smooth/blurry one).
Choose one of the SpriteBatch.Begin calls that takes a SamplerState and pass inSamplerState.PointClamp (selects the pixel at that precice "point").
Posted 15 March 2013 - 11:01 AM
You should be able to set the texture filter to point to get the desired result.
Oh, thanks! But i don't understand what i'm supposed to do with my spritebatch. I'm a bit new to this.
The spritebatch Begin call takes several parameters. One of these parameters a SamplerState. Pass in SamplerState.PointClamp.
It would look something like this:
I'm assuming you are working in XNA 4.0.