PDA

View Full Version : There IS a workaround for AA in HL2 for Nvidia cards


tastyweat
07-24-03, 05:43 PM
Yet, it requires some of the pixel shader powers - in which performance for Nvidia aint great.

Here is what Gabe Newell said:

Since people seem to be hyperventilating over the anti-aliasing issue, I thought I'd update everyone.
1) How bad is the problem?

With current multi-sample implementations of anti-aliasing, you may sample texels outside of the polygon boundary, which may result in sampling light maps from other polygons.

This has always been a problem. This is a problem with Quake 1, Quake 2, Quake 3, Daikatana, Sin, Elite Force, Half-Life, Counter-Strike on the X-Box, or any game that uses packed lightmaps with multi-sample anti-aliasing.

You would see these artifacts on polygon boundaries where the wrong lightmap is being sampled. It will look like a bright or dark line on the edge of a polygon.

Gary McTaggart brought this up in an email because he is being pretty hardcore about graphics quality right now. This is not a new problem. If you've run a game that uses lightmaps with anti-aliasing turned on, then you've been seeing these artifacts the whole time.

Artifacts may show up more frequently in Half-Life 2 simply because we've eliminated lots of other artifacts, and because we have a lot of variation in scene lighting due to our art direction.

To put this in perspective, not doing tri-linear filtering on mipmaps is a lot worse.

2) What are potential solutions?


Support Centroid Sampling

Use Pixel Shaders to Clamp Texture Coordinates


Centroid sampling doesn't have the problem that center sampling does in multi-sample antil-aliasing. ATI has supported this form of anti-aliasing for the 9000 series. The tricky part is enabling this when DirectX doesn't easily expose this.

There's a different trick you can use with hardware, such as NVIDIA's, that doesn't support centroid sampling. Basically you trade off some pixel shader bandwidth to clamp the texture coordinates so that you don't sample texels outside of that polygon's lightmap sub-rect.

Between these two approaches, multi-sample anti-aliasing artifacts should be a non-issue for any DX9-level hardware running Pixel Shader 2.0.

3) How will this look?

We'll release one of the demo movies with the anti-aliasing artifacts in and one with the anti-aliasing changes.

saturnotaku
07-24-03, 06:00 PM
http://www.nvnews.net/vbulletin/showthread.php?s=&threadid=15315

tastyweat
07-24-03, 06:04 PM
Didn't see it there - because I stick to the games forum more atm - and this is HL2 - a game!!! lol