HD filter like that in Guardian Heroes HD?

Hi guys,

Kind of wondering if there is any way to apply a filter to scaled-up low res graphic assets so they look better on a larger screen. Guardian Heroes HD (on Xbox 360) used this trick:

I don’t know what kind of filter they’re using, but you may find this interesting:

Thanks for providing the algorithms @KakCAT! I wonder if MG supports filters and if there are any existing filters I can play with? I don’t think I’ll be able to write a filter myself without spending tons of hours learning about computer graphics…

Just pass SamplerState.PointClamp in SpriteBatch.Begin() to disample filtering/bluring when you scale textures.

[quote=“greyp, post:3, topic:6616”]
I wonder if MG supports filters
[/quote]You would be writing a shader effect to implement those scaling algorithms. Any tutorial on XNA shaders should be able to help you.

Thanks @nkast and @KonajuGames ! I’ll definitely give it a try, but something like that in Guardian Heroes might be a bit too hard for me to implement haha…

At first I thought you wanted a pixelated effect. So you want to start from pixelated low-res and improve the quality, right?
MonoGame doesn’t have any Post-Processing effect out of the box. From the image I think you want something like a pencil drawing effect. After a small search on google I found some related terms like Pencil Sketch, Pencil drawing, Real-Time Hatching, Tonal Art Maps.

A good point to start is the shader at http://www.cmlab.csie.ntu.edu.tw/~daniel/projects/hatching/hatching.htm

Thanks so much @nkast ! Actually what I am looking for is some post-processing effects on a rendertarget (kind of like the filters in PhotoShop). My game is a 2D game, so I guess all those fancy 3D shaders out there probably won’t work with it…

There’s no 3D shader. All pixel shaders work on a 2D triangle. Whether that triangle is in perspective or parallel with the near plane makes no difference. You can use a custom shader to draw your render target to the frame buffer with any effect you want.

Ahhh I didn’t realize that… Gotta spend some time on learning about computer graphics… Thanks a lot @KonajuGames! :slight_smile:

Rather than doing this every frame in a shader, I recommend preprocessing all the low-res bitmaps to up-scale them, then use the up-scaled bitmaps in your game in the regular way. There are many algorithms available to vectorize a bitmap. Microsoft Research developed a good one:
Paper: http://johanneskopf.de/publications/pixelart/paper/pixel.pdf
I don’t if a reference implementation was published though.