Anti Aliasing and alpha textures, maybe this might work?

K.I.L.E.R

Retarded moron
Veteran
2 algorithms, I noticed on the first page of Beyond3D.

Can these AA algorithms be implemented with MSAA or by themselves and be effective at AA'ing the entire scene?

Silhouette Clipping algorithm and Discontinuity Edge Overdraw algorithm.

I am sure the Discontinuity Edge Overdraw algorithm can AA alpha textures but I'm not sure if Ati/NV would implement it.

What are the drawbacks of each algorithm?

Maybe it can be used in conjunction with MSAA? I believe it might require line AA to work and the R300 supports line AA in both D3D and GL.
 
I read the paper and I think it won't AA any non-edges (including junctions and alpha test textures). Of course, you can still use it with MSAA, but you lose the speed advantage.
 
If you run the guy's AA demo, load up the F-16... toggle the AA algo (both algos, doesn't matter) on and off... look at the textures on the F-16.

The guy's method is interesting but it looks like it is only limited to polygon edge AA (I think).
 
Multi-sampling is the better technique. Hoppe even mentions this in the hindsight of the paper he wrote detailing this technique.
 
I say what we need is a sort of mix between MSAA and SSAA. Not talking about 4xS here - an intelligent mix.
That is, like 4x MSAA everywhere normally but automatically does 2x SSAA + 2x MSAA ( with a rather big performance hit, of course ) for alpha textures.
Since it's only alpha textures, and the rest is MSAA, the performance hit shouldn't be TOO huge...

I don't know how difficult to implement that would be. And no matter what, I doubt any IHV is interested in losing silicon for that sort of stuff, eh... :( They don't like alpha textures much anyway... So come on IHVs, give us huge poly counts! Please?

As for MSAA - I think that once we'll get 8x or 9x RGMSAA with GC, or maybe even jittered, we won't need much more multisampling ( unless you want to go at really low resolutions, that is ) - 1600x1200 + 9x RGMSAA is a buffer width of 4800x3600, and it's better than that for edges since it got Gamma Correction and it's rotated.

So, once we'll have that ( *hopes the NV40/R420 got it, even maybe if not at sufficent speed for all new games* ) - well, we better focus on shading speed! :)


Uttar
 
There are other solutions to high quality high performance AA,asides from MSAA+Compression, the obvious, straightforward and somewhat brutish solution currently available.An evolved version of what the Parhelia has should prove to be a really nice solution(totally unrelated to AAing Alpha textures :LOL:)
 
There are ways to do Anti-Aliased alpha while doing Multisampling. One such way is to convert the alpha value of the incoming pixel to a coverage bitmap where the number of covered samples is proportional to the incoming alpha value and the actual samples are selected in a pseudo-random manner. This functionality is actually a part of standard OpenGL from version 1.3 and up (dunno about Direct3d) and can under GL be enabled with
Code:
glEnable( GL_SAMPLE_ALPHA_TO_COVERAGE );
(if you are interested in more details, you can download the GL 1.3 standard from here. This feature is explained in chapter 4.1.3) This method has a caveat, though: if you draw multiple alpha-blended polygons on top of each other, you may not get quite the expected result. It should work fine with alpha-testing, though.
 
arjan de lumens said:
There are ways to do Anti-Aliased alpha while doing Multisampling.

Exactly. The need for supersampling to antialias alpha test texture pseudo-edges is only to provide backwards compatability for older games that were written before multisampling was widely available on consumer hardware.
 
arjan de lumens said:
There are ways to do Anti-Aliased alpha while doing Multisampling. One such way is to convert the alpha value of the incoming pixel to a coverage bitmap where the number of covered samples is proportional to the incoming alpha value and the actual samples are selected in a pseudo-random manner. This functionality is actually a part of standard OpenGL from version 1.3 and up (dunno about Direct3d) and can under GL be enabled with
Code:
glEnable( GL_SAMPLE_ALPHA_TO_COVERAGE );
(if you are interested in more details, you can download the GL 1.3 standard from here. This feature is explained in chapter 4.1.3) This method has a caveat, though: if you draw multiple alpha-blended polygons on top of each other, you may not get quite the expected result. It should work fine with alpha-testing, though.
But the available implementations (at least from NVidia, don't know for sure about ATI) have more than one disadvantage, one being that there's no pseudo-randomness. And the second one is that there are more transparency levels (16) than samples (4) - achieved by dithering which you can't disable. For smooth edges, dithering is a poor choice.
 
arjan de lumens, I have asked OpenGL Guy about converting alpha textures into another format and he said it wasn't something that would be done. Something along those lines anyway.

Out of all the things in the world, why can't AT in games be AA'ed without the use of SSAA?
 
K.I.L.E.R said:
Out of all the things in the world, why can't AT in games be AA'ed without the use of SSAA?
MSAA doesn't touch textures. The only way to smooth "holes" in textures is the use of alpha blending. But alpha blending has two big disadvantages: it needs a lot of bandwith and has a big cpu utilisation.
 
arjan de lumens said:
There are ways to do Anti-Aliased alpha while doing Multisampling. One such way is to convert the alpha value of the incoming pixel to a coverage bitmap where the number of covered samples is proportional to the incoming alpha value and the actual samples are selected in a pseudo-random manner. This functionality is actually a part of standard OpenGL from version 1.3 and up (dunno about Direct3d) and can under GL be enabled with
Code:
glEnable( GL_SAMPLE_ALPHA_TO_COVERAGE );
(if you are interested in more details, you can download the GL 1.3 standard from here. This feature is explained in chapter 4.1.3) This method has a caveat, though: if you draw multiple alpha-blended polygons on top of each other, you may not get quite the expected result.
It doesn't look good.
It should work fine with alpha-testing, though.
I don't think so. Imagine a texture where alpha values are either 0 or 1. Your coverage mask would then always be either 0 or 1, hence, no AA.
 
OpenGL guy said:
It doesn't look good.
As a replacement for alpha blending, yes, because the number of samples is way too low. Do you know how many intermediate levels of transparency there are on ATI hardware when using alpha to coverage?

It should work fine with alpha-testing, though.
I don't think so. Imagine a texture where alpha values are either 0 or 1. Your coverage mask would then always be either 0 or 1, hence, no AA.
Texture filtering? ;)
 
OpenGL guy said:
It doesn't look good.
As expected, as it would turn alpha-blending into dithering (too few transparency levels), and also, likely select the same sample points for different polygons for the same pixel, causing transparent layers beneath the top layer to disappear.

It should work fine with alpha-testing, though.
I don't think so. Imagine a texture where alpha values are either 0 or 1. Your coverage mask would then always be either 0 or 1, hence, no AA.
Umm, texture filtering? You would usually apply bi/trilinear interpolation to the texture map, so unless texels are perfectly pixel aligned, you would get alpha values between 0 and 1 even if the texture map itself only contains 0s and 1s.
 
arjan de lumens said:
It should work fine with alpha-testing, though.
I don't think so. Imagine a texture where alpha values are either 0 or 1. Your coverage mask would then always be either 0 or 1, hence, no AA.
Umm, texture filtering? You would usually apply bi/trilinear interpolation to the texture map, so unless texels are perfectly pixel aligned, you would get alpha values between 0 and 1 even if the texture map itself only contains 0s and 1s.

That still don't make it an AA algorithm.

Anti aliasing works by sampling at higher resolution and filtering it down.
While coverage masks uses more samples per pixel, those samples doesn't represent more sub-sample information so it won't remove aliasing either.
 
Exxtreme said:
K.I.L.E.R said:
Out of all the things in the world, why can't AT in games be AA'ed without the use of SSAA?
MSAA doesn't touch textures. The only way to smooth "holes" in textures is the use of alpha blending. But alpha blending has two big disadvantages: it needs a lot of bandwith and has a big cpu utilisation.

Emphasis mine.

The problem is we need anti-aliasing and not smoothing.
 
Hyp-X said:
That still don't make it an AA algorithm.

Anti aliasing works by sampling at higher resolution and filtering it down.
While coverage masks uses more samples per pixel, those samples doesn't represent more sub-sample information so it won't remove aliasing either.
There are methods that are considered to be anti-aliasing that aren't based on sampling at higher resolutions: in particular, the method that computes analytic coverage, converts it to alpha and then does alpha-blending is commonly used to antialias lines, for example (with results that generally look better than what multisampling achieves).

As for the alpha-to-coverage-mask conversion method: it WILL smooth edges introduced by alpha testing. There will possibly be artifacts where multiple alpha-test edges pass through the same pixel, though.
 
arjan de lumens said:
There are methods that are considered to be anti-aliasing that aren't based on sampling at higher resolutions: in particular, the method that computes analytic coverage, converts it to alpha and then does alpha-blending is commonly used to antialias lines, for example (with results that generally look better than what multisampling achieves).

Analytic coverage uses information of sub-pixel behaviour of the function (that would otherwise be sampled).
It's a more elegant method than the brute-force solution of simply taking multiple samples.
But my point was that the AA algorithm includes sub-pixel information. (So yes analytic coverage is an AA algorithm.)

As for the alpha-to-coverage-mask conversion method: it WILL smooth edges introduced by alpha testing. There will possibly be artifacts where multiple alpha-test edges pass through the same pixel, though.

Alpha-to-coverage-mask aproximates alpha-blending in a way that doesn't require depth sorting.
Still alpha-blending is not a good way of reducing AA.
It's like trilinear filtering alone is not a good way to reduce texture aliasing, because it throws away to much information, thats why we need anisotropic filtering.
 
Hyp-X said:
Analytic coverage uses information of sub-pixel behaviour of the function (that would otherwise be sampled).
It's a more elegant method than the brute-force solution of simply taking multiple samples.
But my point was that the AA algorithm includes sub-pixel information. (So yes analytic coverage is an AA algorithm.)
So is alpha blending / alpha-to-coverage when using alpha mask textures and texture filtering. Because it really is a way to determine coverage, at least when minifying textures. Magnifying however introduces blur.
 
Back
Top