I want to know what pattern the point position is. i dont find the law of these eight points
1 Answers
Those are the standard DirectX MSAA sampling patterns. Even though there can be other sampling patterns, these are required for any DirectX 10 compliant card (and later versions as well).
Apparently Vulkan has adopted the same sampling patterns.
I don't know how Microsoft came up with those patterns though.
An interesting observation is that no 2 points lay on the same row or column. That makes me think it could be inspired by matrix determinant multiplications, but this is just speculation.
Looks like when no 2 samples lay on the same column or row it's called N-rooks (named after chess piece). Thanks @krOoze for the call.
I have found some interesting info about N-rooks in the book "Real Time Rendering 4th ed":
N-rooks is a family of sampling patters. Inside this family, some patterns are better than others.
For example, filling the diagonal is considered a bad placement.
There is a subfamily of N-rooks which is called RGSS (Rotated Grid Super Sampling)
Quoting the book:
The RGSS pattern is a form of Latin hypercube or N-rooks sampling, in which n samples are placed in an n×n grid, with one sample per row and column
The RGSS 4-rooks pattern looks exactly like the 2x2 pattern that Vulkan uses.
Quoting the book:
We also want a uniform distribution, spreading samples evenly over the area. To form such patterns, stratified sampling techniques such as Latin hypercube sampling are combined with other methods such as jittering, Halton sequences, and Poisson disk sampling [1413, 1758]. In practice GPU manufacturers usually hard-wire such sampling patterns into their hardware for multisampling antialiasing.
So the sampling standard pattern used in Vulkan and DirectX are probably just something found randomly that met certain desirable properties (such as N-rooks, evenly distributed in the area, etc). And now the are hard-wired in hardware.

- 3,232
- 1
- 26
- 41
-
The points need to avarage to the center of the pixel, so that is not particularly surprising observation. – krOoze Nov 24 '22 at 13:16
-
@krOoz That's a different unrelated observation. You could have points average to the center of the pixel, while having all of them in the same row or column. – tuket Nov 24 '22 at 15:28
-
@krOzz Actually, your observation doesn't seem to hold for the 16x16 pattern. For the X dimension `1-1-3+4-5+2+5+3-2+0-4-6-8+7+6-7 = -8`. Unless I made some mistake, or misunderstood – tuket Nov 24 '22 at 15:34
-
You must have made a mistake. Sum of sequence is half of the count of its elements. The 16x16 is only interesting in that it is offset by 1/32 unlike the others where the grid is centered. It is not really a different observation, because you could not do it in any different way without making it unusable. If you used something twice, you would be forced to use something else twice, creating holes, so the sampling "pattern" would not be uniform and stochastic enough anymore. – krOoze Nov 24 '22 at 20:34
-
"The 16x16 is only interesting in that it is offset by 1/32 unlike the others where the grid is centered" This is actually what I was saying: the average is not 0, thus not centered. Sorry, I still think they they are different observations: 1) No two points lay in the same row or column, 2) The points need to average to the center of the pixel. One doesn't imply the other. "unusable", "use something", "holes", "stochastic enough" are ill-defined so it's hard to argue against that. But if you take a look at this [diagram](https://t.ly/jQQp), some of the patterns meet 2) but not 1) – tuket Nov 24 '22 at 22:48
-
If you say so; seems directly correlated to me... But seems you found out how it is called. It is N-rooks pattern\sampling. – krOoze Nov 25 '22 at 05:12
-