Jaggies
{{short description|Jagged effect produced by naive upscaling of raster shapes with few pixels defining a curve}}
Image:Test nn.gif. Thus, the "jaggies" on the edges of the symbols became more prominent.]]
Jaggies are artifacts in raster images, most frequently from aliasing,{{Cite web |last=Mitchell |first=Don P. |title=The Antialiasing Problem in Ray Tracing |url=http://www.mentallandscape.com/Papers_siggraph90tutorial.pdf |url-status=live |archive-url=https://web.archive.org/web/20081114111536/http://www.mentallandscape.com/Papers_siggraph90tutorial.pdf |archive-date=2008-11-14 |access-date=2009-04-16}} which in turn is often caused by non-linear mixing effects producing high-frequency components, or missing or poor anti-aliasing filtering prior to sampling.
Jaggies are stair-like lines that appear where there should be "smooth" straight lines or curves. For example, when a nominally straight, un-aliased line steps across one pixel either horizontally or vertically, a "dogleg" occurs halfway through the line, where it crosses the threshold from one pixel to the other.
Jaggies should not be confused with most compression artifacts, which are a different phenomenon.
Causes
Jaggies occur due to the "staircase effect". This is because a line represented in raster mode is approximated by a sequence of pixels. Jaggies can occur for a variety of reasons, the most common being that the output device (display monitor or printer) does not have sufficient resolution to portray a smooth line.{{Cite magazine |date=March 1996 |title=The Next Generation 1996 Lexicon A to Z: Jaggies |magazine=Next Generation |publisher=Imagine Media |issue=15 |page=35}} In addition, jaggies often occur when a bit-mapped image is scaled to a higher resolution. This is one of the advantages that vector graphics have over bitmapped graphics – a vector image can be losslessly scaled to any arbitrary resolution or stretched infinitely in either axis without introducing jaggies.
Solutions
The effect of jaggies can be reduced by a graphics technique known as spatial anti-aliasing. Anti-aliasing smooths out jagged lines by surrounding them with transparent pixels to simulate the appearance of fractionally-filled pixels when viewed at a distance. The downside of anti-aliasing is that it reduces contrast – rather than sharp black/white transitions, there are shades of gray – and the resulting image can appear fuzzy. This is an inescapable trade-off: if the resolution is insufficient to display the desired detail, the output will either be jagged, fuzzy, or some combination thereof. While machine learning-based upscaling techniques such as DLSS can be used to infer this missing information, other types of artifacts may be introduced in the process.{{Cite web |date=2024-02-14 |title=Is Upscaling Useful at Lower Resolutions? Nvidia DLSS vs Native at 1080p |url=https://www.techspot.com/article/2803-dlss-vs-native-1080p/ |access-date=2024-12-23 |website=TechSpot |language=en-US}}
In real-time 3D rendering such as in video games, various anti-aliasing techniques are used to remove jaggies created by the edges of polygons and other contrasting lines. Since anti-aliasing can impose a significant performance overhead, games for home computers often allow users to choose the level and type of anti-aliasing in use in order to optimize their experience, whereas on consoles this setting is typically fixed for each title to ensure a consistent experience. While anti-aliasing is generally implemented through graphics APIs like DirectX and Vulkan, some consoles such as the Xbox 360 and PlayStation 3 are also capable of anti-aliasing to little direct performance cost by way of dedicated hardware which performs anti-aliasing on the contents of the framebuffer once it has been rendered by the GPU.{{Cite web |last=Leadbetter |first=Richard |last2= |first2= |date=2010-01-16 |title=The Anti-Aliasing Effect |url=https://www.eurogamer.net/the-anti-aliasing-effect-article |access-date=2024-12-23 |website=Eurogamer.net |language=en}} Jaggies in bitmaps, such as sprites and surface materials, are most often dealt with by separate texture filtering routines, which are far easier to perform than anti-aliasing filtering. Texture filtering became ubiquitous on PCs after the introduction of 3Dfx's Voodoo GPU.
Notable uses of the term
In the 1985 game Rescue on Fractalus! for the Atari 8-bit computers, the graphics depicting the cockpit of the player's spacecraft contains two window struts, which are not anti-aliased and are therefore very "jagged". The developers made fun of this and named the in-game enemies "Jaggi", and also initially titled the game Behind Jaggi Lines!. The latter idea was scrapped by the marketing department before release.{{Cite web |last=Hague |first=James |title=Interview with David Fox |url=http://www.dadgum.com/halcyon/BOOK/FOX.HTM |url-status=live |archive-url=https://web.archive.org/web/20081208112929/http://www.dadgum.com/halcyon/BOOK/FOX.HTM |archive-date=2008-12-08 |access-date=2008-10-10}}