Valve's Gabe Newell On Half-Life 2 Anti Aliasing

Published by

A recent post in the Half-Life 2 forums questioning the possibility of full screen anti aliasing with Half-Life 2, especially on Nvidia GeForce FX graphics cards, has caused many gamer's a headache. Gabe Newell, Valve Software's managing director, now posted more details on the matter: 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 anti-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. Source: HalfLife2.net forums