Frequently Asked Forum Questions
 Search the HBO News Archives

Any All Exact 
Search the Halo Updates DBs

BWU Halo Halo2 
Search Older Posts on This Forum:
Posts on Current Forum | Archived Posts

View Thread Reply Return to Index Set Prefs Previous Next
Sampling and stuff, state of 3D graphics, *IMGs*
Date: 5/10/14 6:52 pm
In Response To: Why is this better? (Urban Reflex)

: I'm an ignoramus trying to understand what the advantages of this are
: exactly. Obviously the textures are the same, so is it that the models are
: all less pixelated and so appear smoother? And this lets you see things in
: more detail further away?

So, let's suppose you're going to render a game at some amazingly high resolution like 10x3. Each pixel is used to represent some area of coverage in your image.

Now, let's suppose that our scene is a sloped transition between a black object and a white object.

In computer graphics, short of any special filtering, the typical approach is to calculate the colour at the center point of a pixel (the red dots in the above images) and use that as the pixel's colour. In this case, the result is this:

This isn't really very accurate. For instance, that pixel in the top left is representing itself as entirely white, even though its immediately area contains a lot of black.

To get a better sense for color coverage for a pixel, the simplest approach is to take more spatial samples. So, instead of just sampling the colour at the red dot, let's consider sampling the colour at all of the purple dots:

If we determine the value at all of the purple dots within a pixel and average them together, we get this result:

It's hard to see that this is obviously better when looking at the pixel grid all blown-up, but let's look at slopes sampled like this at native res. Left is sampled just at pixel center, right is sampled at four points.

The image on the right looks more like an actual slope instead of a staircase, and will appear much more stable in motion.


: Obviously the textures are the same

Well, sort of. The textures are the same, but supersampling improves the quality of the filtering, particularly for surfaces viewed at oblique angles. Though anisotropic filtering in modern graphics hardware does a pretty good job of dealing with this as-is.


Here's something of a caveat:

Small stairstep patterns in video games are almost always geometric aliases. This means that it's possible to write a post-process algorithm that does a pretty good job of dealing with them without need for supersampling. The algorithm looks for stairstepping boundaries between two regions and replaces the stairsteps with a "perfect coverage" edge. One such algorithm that has received lots of recent popularity is SMAA 1x.


"Look for the stairstepping and turn it into non-stairstepping" only works if an object is being adequately detected in the first place. If you have a thin object in the far distance, a pixel center might land on it in one frame and then miss it in the next frame; in motion, parts of the object will shimmer in and out of existence, and even excellent algorithms like SMAA 1x will be hopeless to do anything about it. This is why the developers of SMAA designed it specifically to work nicely alongside increased sampling.


Plain old spatial supersampling is the simplest technique to boost sampling, and it works on every kind of spatial aliasing imaginable. It's also not too difficult to implement with a reasonable degree of correctness. But it works by increasing the load on every per-pixel part of the graphics pipeline, and is generally extremely inefficient. It's something that most people only consider when they have a game running with decent settings and are still not stressing their GPUs much at all.

Interestingly, temporal supersampling seems to be becoming extremely popular. The idea is that you use colour information from the previous frame(s) as extra samples, instead of rendering each frame at a high resolution. Reach's TAA is a very crude implementation of this which only works on moving scenes; it turns off for moving imagery (except when it fails to detect motion, which is when you get Reach's famous ghosting). Some eighth-gen games like InFAMOUS Second Son actually use their motion buffers to reproject the previous frame onto the new one, and this is done alongside more precise motion buffers; these new implementations do a phenomenal job of minimizing ghosting, while enjoying supersampling in motion. The result isn't quite as good as having tons of spatial supersampling, but it's also much cheaper.

Killzone Shadowfall's multiplayer does something very interesting with temporal sampling. It's "1080p", but it only renders half that many pixels on each new frame. It reprojects tons of information from previous frames to produce a "1080p" frame.
The result looks pretty good considering that the number of new spatial samples each frame is barely higher than 720p.

Messages In This Thread

Halo CE at 8K ResolutionTrunks5/9/14 4:50 pm
     8K!?uberfoop5/9/14 6:34 pm
     Isn't this basically just 16x FSAA?RC Master5/10/14 10:12 am
           Re: Isn't this basically just 16x FSAA?uberfoop5/10/14 2:11 pm
           Re: Isn't this basically just 16x FSAA?Cody Miller5/10/14 7:27 pm
                 Well...ZackDark5/10/14 11:47 pm
                       Why the hell wouldn't you? :-)scarab5/11/14 4:21 am
                       Re: Well...RC Master5/11/14 10:09 am
                             HehZackDark5/11/14 10:46 am
                                   Speaking of whichZackDark5/11/14 10:47 am
                                         Simple answer...RC Master5/11/14 1:05 pm
                                               Re: Simple answer...RC Master5/11/14 1:13 pm
                                                     WaitZackDark5/11/14 2:21 pm
                                                           Re: Waituberfoop5/11/14 2:26 pm
                                                                 Sounds delicious *NM*ZackDark5/11/14 3:30 pm
     Why is this better?Urban Reflex5/10/14 4:59 pm
           Re: Why is this better?davidfuchs5/10/14 5:50 pm
                 Re: Why is this better?Urban Reflex5/10/14 6:09 pm
           Sampling and stuff, state of 3D graphics, *IMGs*uberfoop5/10/14 6:52 pm
                 Very informative. Thank you for that *NM*ZackDark5/11/14 12:06 am
                 Thank you Super Fooper, good stuff *NM*CARDO 8 ATL5/12/14 4:21 pm

Sign up to post.

You will only be able to post to the forum if you first create a user profile.
If, however, you already have a user profile, please follow the "Set Preferences" link on the main index page and enter your user name to log in to post.