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|300px|A comparison between nearest neighbor scaling and HQ2x scaling]]
+
[[File:Nearest_Neighbor_2x_versus_HQ2x.png|thumb|A comparison between nearest neighbor scaling and HQ2x scaling]]
:''This article is about smoothing techniques that may be present even on original hardware. For the process of replacing textures to improve their visual fidelity or other aesthetic reasons, see [[Texture Packs]].''
 
  
'''[[wikipedia:Texture filtering|Texture filtering]]''' refers to the methods used to smooth the textures of a 3D model. Every home console after the [[Nintendo 64 emulators|Nintendo 64]] is able to do it, including every modern PC and Android device. This makes it useful in emulation, where it can be applied to emulators for consoles that did not originally have it through various emulators that support it.
+
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" style="text-align:center;"
+
{| 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:left;" |[[Super Nintendo emulators|Super Nintendo]]
+
|[[Super Nintendo emulators|Super Nintendo]]
|{{}}
+
| style="text-align: center;"|
|
+
| style="text-align: center;"|
 
|-
 
|-
| style="text-align:left;" |[[3DO emulators|3DO]]
+
|[[3DO emulators|3DO]]
|{{✗}}
+
| style="text-align: center;"|
|?
+
| style="text-align: center;"|?
 
|-
 
|-
| style="text-align:left;" |[[Atari Jaguar emulators|Atari Jaguar]]
+
|[[Atari Jaguar emulators|Atari Jaguar]]
|{{}}
+
| style="text-align: center;"|
|
+
| style="text-align: center;"|
 
|-
 
|-
| style="text-align:left;" |[[Sega Saturn emulators|Sega Saturn]]
+
|[[Sega Saturn emulators|Sega Saturn]]
|{{}}
+
| style="text-align: center;"|
|
+
| style="text-align: center;"|
 
|-
 
|-
| style="text-align:left;" |[[PlayStation emulators|PlayStation]]
+
|[[PlayStation emulators|PlayStation]]
|{{✗}}
+
| style="text-align: center;"|
|
+
| style="text-align: center;"|
 
|-
 
|-
| style="text-align:left;" |[[Nintendo 64 emulators|Nintendo 64]]
+
|[[Nintendo 64 emulators|Nintendo 64]]
|{{}}
+
| style="text-align: center;"|
|Three-sample
+
| style="text-align: center;"|Three-sample
 
|-
 
|-
| style="text-align:left;" |[[Sega Dreamcast emulators|Sega Dreamcast]]
+
|[[Sega Dreamcast emulators|Sega Dreamcast]]
|{{}}
+
| style="text-align: center;"|
|Bilinear, trilinear, anisotropic
+
| style="text-align: center;"|Bilinear, trilinear, anisotropic
 
|-
 
|-
| style="text-align:left;" |[[PlayStation 2 emulators|PlayStation 2]]
+
|[[PlayStation 2 emulators|PlayStation 2]]
|{{}}
+
| style="text-align: center;"|
|Bilinear, trilinear, Anisotropic
+
| style="text-align: center;"|Bilinear, trilinear, Anisotropic
 
|-
 
|-
| style="text-align:left;" |[[GameCube emulators|GameCube]]
+
|[[GameCube emulators|GameCube]]
|{{✓}}
+
| style="text-align: center;"|
|Bilinear, trilinear, anisotropic
+
| style="text-align: center;"|Bilinear, trilinear, anisotropic
 
|-
 
|-
| style="text-align:left;" |[[Xbox emulators|Xbox]]
+
|[[Xbox emulators|Xbox]]
|{{✓}}
+
| style="text-align: center;"|
|Bilinear, trilinear, anisotropic
+
| style="text-align: center;"|Bilinear, trilinear, anisotropic
 
|-
 
|-
| style="text-align:left;" |[[Nintendo DS emulators|Nintendo DS]]
+
|[[Nintendo DS emulators|Nintendo DS]]
|{{}}
+
| style="text-align: center;"|
|?
+
| style="text-align: center;"|?
 
|-
 
|-
| style="text-align:left;" |[[PlayStation Portable emulators|PlayStation Portable]]
+
|[[PlayStation Portable emulators|PlayStation Portable]]
|{{}}
+
| style="text-align: center;"|
|Bilinear, trilinear
+
| style="text-align: center;"|Bilinear, trilinear
 
|-
 
|-
| style="text-align:left;" |[[Wii emulators|Wii]]
+
|[[Wii emulators|Wii]]
|{{✓}}
+
| style="text-align: center;"|
|Bilinear, trilinear, anisotropic
+
| style="text-align: center;"|Bilinear, trilinear, anisotropic
 
|}
 
|}
  
 
==Types of Texture Filtering==
 
==Types of Texture Filtering==
  
{| class="wikitable" style="text-align:center;"
+
{| class="wikitable"
! scope="col"|Filtering type
+
! scope="col" style="text-align: center;"|Filtering type
! scope="col"|What it does
+
! scope="col" style="text-align: center;"|What it does
! scope="col"|Pros
+
! scope="col" style="text-align: center;"|Pros
! scope="col"|Cons
+
! scope="col" style="text-align: center;"|Cons
 
|-
 
|-
|'''Nearest neighbor'''
+
| style="text-align: center;"|'''Nearest neighbor'''
|This method sorts pixels into the nearest place relevant to its placement in the original resolution, in order to display the image at whatever resolution you specify.
+
| style="text-align: center;"|This method sorts pixels into the nearest place relevant to it's placement in the original resolution, in order to display the image at whatever resolution you specify.
|
+
| style="text-align: center;"|
 
*Very fast.  
 
*Very fast.  
 
*At integer values (eg, exactly double or quadruple resolution) it's practically "unfiltered".
 
*At integer values (eg, exactly double or quadruple resolution) it's practically "unfiltered".
|
+
| style="text-align: center;"|
 
*Unfiltered pixels tend to look odd, with some being thicker than others.  This can result in pixel art losing clarity, and text may become hard to read.
 
*Unfiltered pixels tend to look odd, with some being thicker than others.  This can result in pixel art losing clarity, and text may become hard to read.
 
|-
 
|-
|'''Bilinear'''
+
| style="text-align: center;"|'''Bilinear'''
|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;"|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;"|
 
*At low resolutions, 2D games tend to become very blurry.  This is especially noticeable in 2D games, and low res 3D games.
 
*At low resolutions, 2D games tend to become very blurry.  This is especially noticeable in 2D games, and low res 3D games.
 
*If you have the hardware to do so, look into more complex filtering methods to preserve clarity.
 
*If you have the hardware to do so, look into more complex filtering methods to preserve clarity.
 
|-
 
|-
|'''Trilinear'''
+
| style="text-align: center;"|'''Trilinear'''
|This linear filtering method does the same thing as bilinear filtering, but additionally interpolates between mipmaps (downscaled versions of the texture used for far away objects), thereby preventing mipmap banding (harsh transitions between mipmap levels).
+
| 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;"|
*As with bilinear, low-resolution games will more than likely appear overly blurry using this method.
+
*As with bilinear, low resolution games will more than likely appear overly blurry using this method.
 
|-
 
|-
|'''HQx'''
+
| style="text-align: center;"|'''HQx'''
|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;"|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;"|
 
*While it is inherently destructive, some games (eg. Yoshi's Island) may benefit from this filter, as it preserves the cartoony look.
 
*While it is inherently destructive, some games (eg. Yoshi's Island) may benefit from this filter, as it preserves the cartoony look.
|
+
| style="text-align: center;"|
 
*Artifacts are common.
 
*Artifacts are common.
 
*Curves and slopes that aren't 45­° look jagged compared to everything else.
 
*Curves and slopes that aren't 45­° look jagged compared to everything else.
Line 106: Line 107:
 
*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 taken from the source and randomly-guessed colors.
+
| style="text-align: center;"|A texture scaling algorithm. Scales the texture and fills edges in with a mixture of pixels taken 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.
 
*Adequate if it's the best option available (e.g. in Pete's OpenGL2 plugin for PSX emulators).
 
*Adequate if it's the best option available (e.g. 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 118:
 
*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.
 
*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.
 
*Worse at some things that HQx excels at.
 
*Worse at some things that HQx excels at.
 
|-
 
|-
|'''xBRZ'''
+
| style="text-align: center;"|'''xBRZ'''
|A modified version of xBR, which is very similar except it's better at scaling up smaller features consisting of <10 pixels.
+
| style="text-align: center;"|A modified version of xBR, which is very similar except it's better at scaling up smaller features consisting of <10 pixels.
|
+
| style="text-align: center;"|
 
*Looks great for many 2D games.
 
*Looks great for many 2D games.
 
*Detects small features that get messed up by HQx and xBR.
 
*Detects small features that get messed up by HQx and xBR.
 
*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 the other scalers excel at.
 
*Worse at some things the other scalers excel at.
Line 161: Line 162:
 
Super_Mario_All-Stars_with_5xBR.png|SNES game with 5xBR texture scaling
 
Super_Mario_All-Stars_with_5xBR.png|SNES game with 5xBR texture scaling
 
</gallery>
 
</gallery>
 +
  
 
==Further reading==
 
==Further reading==
* [https://web.archive.org/web/20140904180543/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 by Durante on creating a hybrid texture filter for PPSSPP.]
+
[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 by Durante on creating a hybrid texture filter for PPSSPP.]
  
 
[[Category:FAQs]]
 
[[Category:FAQs]]

Please note that all contributions to Emulation General Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Emulation General Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: