Valve Defuses NVidia Half-Life 2 Issues
suineg writes "Gabe Newell, Valve's main man, has commented on Half-Life 2 and anti-aliasing problems with DX9 cards over at HalfLife2.net: '[The current problems] ...will look like a bright or dark line on the edge of a polygon. This is not a new problem. 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.'" As far as solutions go, Newell has some: "ATI has supported... [the centroid work-around] form of anti-aliasing for the 9000 series... [as for] NVIDIA's [hardware], that doesn't support centroid sampling... you trade off some pixel shader bandwidth to clamp the texture coordinates."
What? Apart from not making much sense, is this implying that new artifacts are being traded for a lot of older ones? (i.e. get rid of lots of old ones, but by doing that, introduced some more in the process)
Now, would somebody please explain what this "centroid" workaround is all about? Ie. technically, what does it do? :-)
/* Steinar */
(This comment is of course GPLed.)
How will Half-Life run on cards like the Matrox Parhelia and its 16x anti-aliasing? I believe it is a Direct X 8 card.
Based on my understanding of 3D rendering, I don't see how this can happen.
I thought that FSAA worked by one of two methods:
- Render the entire screen at a higher resolution (double width and height, for instance), and then downsample it to the screen resolution
- Render the same scene at screen resolution several times from slightly (sub-pixel) different locations, then mix the images together
Either way, I don't see how texture coordinates would be disturbed such that parts of other textures show through at boundaries. Can someone with an understanding of modern graphics hardware clue me in?
Can't the antialiasing simply be switched off when rendering the translucent polygons and kept for opaque? Worked fine on N64 but that didn't have hardware multipass rendering and such so maybe it's not that simple..
"With current multi-sample implementations of anti-aliasing, you may sample texels outside of the polygon boundary ..."
This is the key, but you have to understand what a centroid is in the first place. A centroid is a the geometric place the triangle (In 3d graphics "polygon" means "triangle in space") defined by the intersection of the lines that go from every corner to the midpoint of the oposite edge. One of its properties (the most relevant for this particular application) is that is allways inside the triangle. It's a litte harder to calculate it than the gravicenter (intersection of any two heights) but is always inside so if you sample a texsel on that point you get the rigth light map for that triangle.
16,777,216 comments ought to be enough for any forum!
This is the same problem that systems programmers have been grappling with for ages-- how much optimization does the system provide in libraries or drivers, and how much does the application developer have to bring to the table. However, in this case, the graphics drivers have to be optimized a heck of a lot in order for people to eek out those last 5-10 frames per second to beat the competitor's product on benchmarks. So then you have hacks happening not only on the side of the drivers/system and hardware itself, but also the game developers who have always used incredible hacks to get around hardware limitations. The intersection of these two worlds gets really ugly when one side doesn't understand what is going on in the other side. :(