I have a 32x32 sprite for a pixel art based game but when I scale the sprite up, it becomes very blurred, I have read about online and I believe the solution lies somewhere in SamplerState
.
I've had a look on the MSDN and around StackOverflow and Gamedev but found nothing useful to a beginner like me. A few code sample but I have no idea where I could work them into my project.
I'm not providing any of my code yet since I'm sure it isn't of any use. All I want is someone to explain how or even just throw some simpler code at me. I don't mind which, most likely I would like to have it explained becuase then I would know how to do it in the future.
SpriteBatch.Begin
can take a SamplerState parameter. All you do is pass in SamplerState.PointClamp
SpriteBatch.Begin (SpriteSortMode, BlendState, SamplerState.PointClamp, DepthStencilState, RasterizerState)
Just like that but replace SpriteSortMode, BlendState, DepthStencilState, and RasterizerState with your desired values. Some can take null if you do not wish to use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With