Editing Texture filtering
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | [[File:Nearest_Neighbor_2x_versus_HQ2x.png|thumb | + | [[File:Nearest_Neighbor_2x_versus_HQ2x.png|thumb|A comparison between nearest neighbor scaling and HQ2x scaling]] |
− | |||
− | ''' | + | In computer graphics, '''texture filtering''' or texture smoothing is the method used to smooth textures used in 3D models. Some consoles use texture filtering. |
+ | |||
+ | In emulation, texture filtering can be applied even if the original console did not use it. Many emulators support such features. | ||
==Consoles== | ==Consoles== | ||
− | {| class="wikitable | + | {| class="wikitable" |
! scope="col"|Console | ! scope="col"|Console | ||
− | ! scope="col"|Texture Filtering | + | ! scope="col" style="text-align: center;"|Texture Filtering |
− | ! scope="col"|Types of filtering | + | ! scope="col" style="text-align: center;"|Types of filtering |
|- | |- | ||
− | | style="text-align: | + | |[[Super Nintendo]] |
− | | | + | | style="text-align: center;"|✗ |
− | | | + | | style="text-align: center;"| |
|- | |- | ||
− | | style="text-align: | + | |[[3DO]] |
− | | | + | | style="text-align: center;"|✗ |
− | |? | + | | style="text-align: center;"|? |
|- | |- | ||
− | | style="text-align: | + | |[[Atari Jaguar]] |
− | | | + | | style="text-align: center;"|✗ |
− | | | + | | style="text-align: center;"| |
|- | |- | ||
− | | style="text-align: | + | |[[Sega Saturn]] |
− | | | + | | style="text-align: center;"|✗ |
− | | | + | | style="text-align: center;"| |
|- | |- | ||
− | | style="text-align: | + | |[[PlayStation]] |
− | | | + | | style="text-align: center;"|✗ |
− | | | + | | style="text-align: center;"| |
|- | |- | ||
− | | style="text-align: | + | |[[Nintendo 64]] |
− | | | + | | style="text-align: center;"|✓ |
− | |Three-sample | + | | style="text-align: center;"|Three-sample bilinear |
|- | |- | ||
− | | style="text-align: | + | |[[Sega Dreamcast]] |
− | | | + | | style="text-align: center;"|✓ |
− | |Bilinear, trilinear, anisotropic | + | | style="text-align: center;"|Bilinear, trilinear, anisotropic |
|- | |- | ||
− | | style="text-align: | + | |[[PlayStation 2]] |
− | | | + | | style="text-align: center;"|✓ |
− | |Bilinear, trilinear | + | | style="text-align: center;"|Bilinear, trilinear |
|- | |- | ||
− | | style="text-align: | + | |[[Gamecube|GameCube]] |
− | | | + | | style="text-align: center;"|✓ |
− | |Bilinear, trilinear, anisotropic | + | | style="text-align: center;"|Bilinear, trilinear, anisotropic |
|- | |- | ||
− | | style="text-align: | + | |[[Xbox]] |
− | | | + | | style="text-align: center;"|✓ |
− | |Bilinear, trilinear, anisotropic | + | | style="text-align: center;"|Bilinear, trilinear, anisotropic |
|- | |- | ||
− | | style="text-align: | + | |[[Nintendo DS]] |
− | | | + | | style="text-align: center;"|✗ |
− | |? | + | | style="text-align: center;"|? |
|- | |- | ||
− | | style="text-align: | + | |[[PlayStation Portable]] |
− | | | + | | style="text-align: center;"|✓ |
− | |Bilinear, trilinear | + | | style="text-align: center;"|Bilinear, trilinear |
|- | |- | ||
− | | style="text-align: | + | |[[Wii]] |
− | | | + | | style="text-align: center;"|✓ |
− | |Bilinear, trilinear, anisotropic | + | | style="text-align: center;"|Bilinear, trilinear, anisotropic |
|} | |} | ||
− | = | + | {| class="wikitable" |
− | + | |+Types of Texture Filtering | |
− | + | ! scope="col" style="text-align: center;"|Filtering type | |
− | ! scope="col" | + | ! scope="col" style="text-align: center;"|What it does |
− | + | ! scope="col" style="text-align: center;"|Pros | |
− | ! scope="col"|Pros | + | ! scope="col" style="text-align: center;"|Cons |
− | ! scope="col"|Cons | ||
|- | |- | ||
− | |'''Nearest neighbor''' | + | | style="text-align: center;"|'''Nearest neighbor''' |
− | | | + | | style="text-align: center;"|Basically, it looks the exact same as having no filter whatsoever. |
− | | | + | | style="text-align: center;"| |
*Very fast. | *Very fast. | ||
− | * | + | *Looks good for 2D games if you want to keep the pixel art aesthetic. |
− | + | | style="text-align: center;"| | |
− | * | + | *3D games look terrible. |
+ | *It's unfiltered pixels. You should know what to expect. | ||
|- | |- | ||
− | |'''Bilinear''' | + | | style="text-align: center;"|'''Nearest Neighbor with Mipmapping''' |
− | |This linear filtering method uses color data from the pixels in a nearest-neighbor texture, and combines multiple bits of color data in order to replace some of the pixels with an averaged-out version of the colors, so that the colors gradually switch rather than jump to a new color. | + | | style="text-align: center;"|Exactly what it says on the tin: Nearest-neighbor filtering with mipmapping. Mipmapping is basically level of detail for textures. The farther away a texture is in a 3D space, the lower the resolution is. This can continue until the texture is completely flat. |
− | | | + | | style="text-align: center;"| |
+ | *Even faster than regular nearest neighbor. | ||
+ | | style="text-align: center;"| | ||
+ | *3D games look terrible. | ||
+ | |- | ||
+ | | style="text-align: center;"|'''Bilinear''' | ||
+ | | style="text-align: center;"|This linear filtering method uses color data from the pixels in a nearest-neighbor texture, and combines multiple bits of color data in order to replace some of the pixels with an averaged-out version of the colors, so that the colors gradually switch rather than jump to a new color. | ||
+ | | style="text-align: center;"| | ||
*Looks better than nearest neighbor for 3D games. | *Looks better than nearest neighbor for 3D games. | ||
*It's the least system-intensive form of texture filtering/scaling. | *It's the least system-intensive form of texture filtering/scaling. | ||
− | | | + | | style="text-align: center;"| |
− | * | + | *2D games look atrocious. |
− | *If you have the | + | *If you have the specs to use them, every other filtering option is better. |
|- | |- | ||
− | |'''Trilinear''' | + | | style="text-align: center;"|'''Trilinear''' |
− | |This linear filtering method does the same thing as bilinear filtering, | + | | style="text-align: center;"|This linear filtering method does the same thing as bilinear filtering, except it passes through twice, giving a smoother gradient. |
− | | | + | | style="text-align: center;"| |
*Looks better than bilinear filtering for 3D games. | *Looks better than bilinear filtering for 3D games. | ||
− | | | + | | style="text-align: center;"| |
− | * | + | *2D games look atrocious. |
|- | |- | ||
− | |'''HQx''' | + | | style="text-align: center;"|'''Anisotropic''' |
− | |A texture scaling algorithm. Scales up a nearest-neighbor version of the texture and fills in the gaps with copies of the pixels next to said gaps. | + | | style="text-align: center;"|Uses oddly-shaped copies of texture parts in order to smooth out pixelated/blurred edges in nearest neighbor/linearly filtered images. Higher sample amounts (e.g. 4x, 8x, 16x) will shape the textures into more complex shapes as needed. |
− | | | + | | style="text-align: center;"| |
− | * | + | *Looks much better than just linear filtering for 3D games. |
− | | | + | *Can be used alongside linear filtering for even smoother-looking textures. |
+ | | style="text-align: center;"| | ||
+ | *Very system-intensive. | ||
+ | *Not recommended for 2D games. | ||
+ | |- | ||
+ | | style="text-align: center;"|'''HQx''' | ||
+ | | style="text-align: center;"|A texture scaling algorithm. Scales up a nearest-neighbor version of the texture and fills in the gaps with copies of the pixels next to said gaps. | ||
+ | | style="text-align: center;"| | ||
+ | *Looks great for many 2D games. | ||
+ | | style="text-align: center;"| | ||
*Artifacts are common. | *Artifacts are common. | ||
− | *Curves and slopes that aren't 45° look | + | *Curves and slopes that aren't 45° slopes look very pixelated compared to everything else. |
*The finer details of the textures/sprites might be obscured by bad edge detection. | *The finer details of the textures/sprites might be obscured by bad edge detection. | ||
*Posterization is very common. There are deposterization filters in some emulators (e.g. PPSSPP) that can aid this, however. | *Posterization is very common. There are deposterization filters in some emulators (e.g. PPSSPP) that can aid this, however. | ||
*Worse at some things that xBR excels at. | *Worse at some things that xBR excels at. | ||
|- | |- | ||
− | |'''2xSaI''' | + | | style="text-align: center;"|'''2xSaI''' |
− | |A texture scaling algorithm. Scales the texture and fills edges in with a mixture of pixels | + | | style="text-align: center;"|A texture scaling algorithm. Scales the texture and fills edges in with a mixture of pixels from the source, and randomly-guessed colors. |
− | | | + | | style="text-align: center;"| |
*Less system-intensive than HQx and xBR. | *Less system-intensive than HQx and xBR. | ||
− | * | + | *Good if it's the best option available (e.g. like in Pete's OpenGL2 plugin for PSX emulators). |
− | | | + | | style="text-align: center;"| |
*Edge detection is horrible. | *Edge detection is horrible. | ||
*Artifacts are common. | *Artifacts are common. | ||
Line 117: | Line 134: | ||
*Archaic. The alternatives are much better. | *Archaic. The alternatives are much better. | ||
|- | |- | ||
− | |'''xBR''' | + | | style="text-align: center;"|'''xBR''' |
− | |A modified version of HQx. It detects edges better, which works better for curved lines, or for slopes that are greater than/less than 45 degrees. | + | | style="text-align: center;"|A modified version of HQx. It detects edges better, which works better for curved lines, or for slopes that are greater than/less than 45 degrees. |
− | | | + | | style="text-align: center;"| |
*Looks great for many 2D games. | *Looks great for many 2D games. | ||
*Edge detection is improved over HQx. This gives textures smoother curves and slopes, as well as fewer artifacts. | *Edge detection is improved over HQx. This gives textures smoother curves and slopes, as well as fewer artifacts. | ||
*3D games look great with it as well. | *3D games look great with it as well. | ||
− | | | + | | style="text-align: center;"| |
*Posterization is common. There are deposterization filters in some emulators (e.g. PPSSPP) that can aid this, however. | *Posterization is common. There are deposterization filters in some emulators (e.g. PPSSPP) that can aid this, however. | ||
− | |||
*Worse at some things that HQx excels at. | *Worse at some things that HQx excels at. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
==Images== | ==Images== | ||
<gallery captionalign="center" position="center"> | <gallery captionalign="center" position="center"> | ||
Psp-linear2.jpg|PSP game with linear filtering | Psp-linear2.jpg|PSP game with linear filtering | ||
− | Psp-nearest2.jpg|PSP game with nearest neighbor | + | Psp-nearest2.jpg|PSP game with nearest neighbor upscaling |
− | Psp-xbr2.jpg|PSP game with 3xBR | + | Psp-xbr2.jpg|PSP game with 3xBR filtering |
</gallery> | </gallery> | ||
<gallery position="center" bordersize="none" captionalign="center"> | <gallery position="center" bordersize="none" captionalign="center"> | ||
Line 154: | Line 156: | ||
N64-nearest.png|N64 game upscaled with nearest neighbor (using Glide64 plugin) | N64-nearest.png|N64 game upscaled with nearest neighbor (using Glide64 plugin) | ||
</gallery><gallery columns="2" captionalign="center" widths="180" position="center" bordersize="none"> | </gallery><gallery columns="2" captionalign="center" widths="180" position="center" bordersize="none"> | ||
− | Snes-nearest.png|SNES game with nearest neighbor | + | Snes-nearest.png|SNES game with nearest neighbor upscaling |
Snes-linear.png|SNES game with linear filtering | Snes-linear.png|SNES game with linear filtering | ||
− | |||
− | |||
− | |||
− | |||
</gallery> | </gallery> | ||
+ | |||
==Further reading== | ==Further reading== | ||
− | + | ||
− | + | [http://en.wikipedia.org/wiki/Texture_filtering Wikipedia's entry on Texture Filtering] | |
+ | |||
+ | [http://board.byuu.org/viewtopic.php?f=10&t=2248 Forum post from the creator of xBR, explaining how the algorithm works] (Warning: is slightly hard to read due to the amount of jargon and big words) | ||
+ | |||
+ | [http://blog.metaclassofnil.com/?p=306 A blog entry on creating a hybrid texture filter for PPSSPP.] | ||
[[Category:FAQs]] | [[Category:FAQs]] |