I have textures that i'm creating and would like to antialias them. I have access to each pixel's color, given this how could I antialias the entire texture?
Thanks
Anti-aliasing is a method by which you can eliminate jaggies that appear in objects in PC games. There are several different types of anti-aliasing methods, each with its own pros and cons. Most PC games have an in-game window where you're able to adjust graphics settings, including anti-aliasing.
In Render mode, Anti-aliasing is achieved by redrawing the rendered scene a specified number of times, each time jittering the image by a small amount, so that in the hard edges are softened by displaying slightly lighter pixels adjacent to the dark ones.
The best anti-aliasing method can be difficult to choose, and it generally depends on your machine. If you have a top-notch, high-end computer, then SSAA is the best solution. If your PC is mid-range, you will probably have the most FPS with FXAA.
An anti-aliasing filter looks at the user-specified sampling frequency and removes any under-sampled frequencies that may appear in the signal (i.e. signal component frequencies >0.5 of the sampling frequency).
I'm sorry but true anti-aliasing does not consist in getting the average color from the neighbours as commented above. This will undoubtfully soften the edges but it's not anti-aliasing but blurring. True anti-aliasing just cannot be done properly on a bitmap, since it has to be calculated at drawing time to tell which pixels and/or edges must be "softened" and which ones must not. For instance: imagine you draw an horizontal line which must be exactly 1 pixel thick (say "high") and must be placed exactly on an integer screen row coordinate. Obviously, you'll want it unsoftened, and proper anti-aliasing algorithm will do it, drawing your line as a perfect row of solid pixels surrounded by perfect background-coloured pixels, with no tone blending at all. But if you take this same line once it's been drawn (i.e. bitmap) and apply the average method, you'll get blurring above and below the line, resulting a 3 pixels thick horizontal line, which is not the goal. Of course, everything could be achieved through the right coding but from a very different and much more complex approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With