That's SSAA.
Supersampling takes multiple samples per pixel and calculates "average" color. Either with uniform weights, or depending on position of pixels. Supersampling basically filters whole image. It is slower, but it also anti-aliases hard edges inside textures, not only on polygon edges.
Multisampling takes only one sample per pixel, but uses positions of samples to determine how much are is inside of polygon/triangle and then reduces color value based on % of color being outside (or alpha channel). Multisampling is faster, because it uses less texture bandwidth, but it anti-aliases only polygon edges - usually that is enough.
Here's a nice explanation with more details:
https://mynameismjp.wordpress.com/2012/10/24/msaa-overview/
To do detect edges, you could change code to detect these three conditions:
1) all samples are inside polygon (basically Touched = true in your code). In such case just take one sample.
2) sample samples are outside of polygon. At least one of Inner(..) calls returns < 0 value, and at least one of Inner(..) calls returns >= 0 value. In such case take multiple samples, like you in Touched = true case. Or just take one sample, and reduce it's color based on how many samples are outside of polygon.
3) all samples are outside of polygon - all Inner(..) calls return < 0 value. Don't render the sample.