2D Toolkit Forum
2D Toolkit => Support => Topic started by: Doghelmer on September 06, 2014, 09:14:24 pm
-
The game I’m developing uses tiles that are 16x16 pixels for its art. The camera is zoomed out a lot, so the play area looks similar to the game Hammerwatch:
http://greenlitgaming.com/wp-content/uploads/2013/02/Hammerwatch-Vendor.png (http://greenlitgaming.com/wp-content/uploads/2013/02/Hammerwatch-Vendor.png)
My camera moves around a lot, and I’ve found that using bilinear filtering on my tiles causes the game to have an overall much “smoother” appearance than point sampling while in motion. As expected, this causes the 16x16 tiles to look extremely blurry. My solution is to scale the images up in Photoshop using Nearest Neighbor, to 64x64, which eliminates that blurriness in the game.
My question: Is there some way to do this type of scaling within Unity/2D Toolkit, or possibly at runtime? It’s annoying to have to create a second "large" version each image in the game, not to mention when I have to go back and modify those images.
Hammerwatch was able to achieve a smoothness of motion while retaining crisp sprites-- I think they were using their own engine, but I’d love to know the best way to achieve this in Unity.
-
I'm not aware of any way to do that at runtime using a shader - all the approaches I can think of are really really expensive. I suppose you could modify the tk2d code to do it, or you could write a batch script that rescales your images using imagemagick...