Jump to content

MaMuS

Member
  • Content Count

    1
  • Joined

  • Last visited

  1. MaMuS

    Birthday thread: Software

    Ross, please be careful with nearest neighbor filtering. If the size you are trying to scale is not an integer number like 2, 3, 4, n times you will get distortion. some lines or columns may appear bigger than others. For example, here we have a 256 by 256 pixels image, and some pattern: When scaled to 1080p, ( by a factor of 4.21875 times ) with bilinear filtering we get a smooth but blurry image, as you noted in your video: But when scaled with no filter, even tough we get a much crispier image, you may notice that some lines and columns are bigger than others: In your video some of the example footage scaled with this method showed this distortion. You can avoid this problem by always scaling with integer factors. If your target screen is 1920x1080 and your source is 256x256 you must resize to 1024x1024 and pad/letterbox everything else. If you have 320x240 as a source, resize to 1280x960. The math is simple, take the smallest dimension in the target resolution (1080) and divide by the corresponding source dimension (240), then floor the number. You will get 4. now multiply the input resolution by that and you get the resolution you really want. Here is what you get: What if you want to fill the entire screen? Use bilinear filtering! since you have already pre-scaled with nearest neighbor, the billinear filter will have much less of a blurry effect on the image: We went from 256x256 -(nearest neighbor)> 1024x1024 -(bilinear)> 1080x1080 If you use MAME there is an option called "pre-scale" that does just that. scales by an integer factor with nearest neighbor and then applies bilinear filtering to fill the screen. Unfortunately I have no idea how you could implement this behavior in windows...
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.