Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: JosLeys on June 14, 2013, 06:59:01 PM




Title: Fragmentarium-Anti Aliasing
Post by: JosLeys on June 14, 2013, 06:59:01 PM
Anti-aliasing is basically averaging out the colors of adjacent pixels.

This normally requires to go through the whole distance finding and coloring process not just for the pixel in question, but also for at least 8 other pixels.
This obviously slows things down, so my question is, can this not be done using a screen buffer?

Calculate every pixel of the image and then do an averaging step on the all the pixels already calculated. I guess this should be much faster.

Has anyone tried to implement this, or am I talking nonsense?

I looked at the "Working with the back buffer.frag" file in Tutorials, but I'm not sure I understand how it works.



Title: Re: Fragmentarium-Anti Aliasing
Post by: eiffie on June 14, 2013, 08:00:48 PM
The scripts that have anti-aliasing use sub-pixels to create an averaged pixel. There isn't any redundancy in the samples - they are all unique. Definitely you can use the backBuffer to average pixels but the result will looked blurred.


Title: Re: Fragmentarium-Anti Aliasing
Post by: Syntopia on June 14, 2013, 11:48:03 PM
Anti-aliasing is basically averaging out the colors of adjacent pixels.

This normally requires to go through the whole distance finding and coloring process not just for the pixel in question, but also for at least 8 other pixels.

As Eiffie said, super sampling anti-aliasing works by choosing a number of samples inside the pixel area and averaging those. You do not need a specific number of samples (uniform grid sampling use a square number of samples, but it is no requirement), and you may assign different weights to them depending on the distance from the center. You may also sample outside the pixel area for a softer look.

There are other types of removing alias artifacts. For instance, computer games often use pure screen space based methods such as FXAA, because of the speed:
http://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing
but I doubt this method will work for fractals.


Title: Re: Fragmentarium-Anti Aliasing
Post by: marius on June 15, 2013, 12:20:34 AM
There are other types of removing alias artifacts. For instance, computer games often use pure screen space based methods such as FXAA, because of the speed:
http://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing
but I doubt this method will work for fractals.

fwiw, I use a bastardized FXAA in boxplorer2 for real-time DoF effects. To some effect.
https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/rrrola/effects_fragment.glsl (https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/rrrola/effects_fragment.glsl)


Title: Re: Fragmentarium-Anti Aliasing
Post by: Syntopia on June 15, 2013, 12:45:36 AM
fwiw, I use a bastardized FXAA in boxplorer2 for real-time DoF effects. To some effect.
https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/rrrola/effects_fragment.glsl (https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/rrrola/effects_fragment.glsl)

Looks interesting! What about without DOF? It is worth applying FXAA or does it just blur the boundaries a bit?


Title: Re: Fragmentarium-Anti Aliasing
Post by: marius on June 15, 2013, 01:17:46 AM
Looks interesting! What about without DOF? It is worth applying FXAA or does it just blur the boundaries a bit?

yeah, adding a plain FXAA option is on the todo list.
Plain FXAA (edit the .glsl) does reduce flickering pixels a lot and detail a bit. Fairly pleasant looking.

But it sure is speedy which is pretty essential w/ devices like Oculus.