# text-rendering: why alpha testing produces wavy edges. And why SDF solves that problem

My first question is almost identical this one. I originally became aware of this when reading Valve's paper on using Signed Distance Field (or SDF for short) as seen here: However, I would really appreciate if someone can expand on that answer a bit further, particularly, an equation of the form $$a + bx + cy + dxy = e$$ would form a particular hyperbola, I don't see how it can cause multiple shifted hyperbolas. Because if my understanding is correct, each time we sample a texture, we are substituting different $$x$$ and $$y$$ values. The coefficients $$a , b , c , d , e$$ are fixed when we sample inside a particular pixel with indices: $$(i,j)$$ assuming we account for the $$0.5$$ center shifting, they are fixed as long as we sample in the range from $$(i + 0.5 , j + 0.5)$$ to $$(i + 1.5 , j + 1.5)$$. So I am not sure how the parabola is formed here, (After a long thinking, I think I got it, as we sample the pixel, we usually traverse the grid in row by row fashion, thus, it would mean the next sample would have the same $$y$$ but different $$x$$, in the next row, we are solving the same equation but with different $$y$$, But then why does this not happen on a vertical edge or a horizontal edge, why it only seems to happen on a diagonal edge. I would appreciate if someone can comment on this, also neglecting the fact GPU does not traverse pixels in a row by row fashion but more like zig-zag path).

My second question, is why does SDF work? The sampling and bilinear filtering that are done are identical to alpha testing case, so what makes SDF not have the problems that typical text rasterization have? I understand it is encoding a distance, but why is that any different from typical color encoding? is it because color information on edges is either true or false but SDF has a smoother transition since it is encoding distance to nearest edge? (while I said that, I am not sure I understand its impact, because we are still clamping the values when we test with SDF, so eventually we also get the true/false decision on the edges).

I could not find any articles online that discusses those type of questions (what causes those artifacts mathematically) my assumption is that they are too basic so no one wastes time with them? I don't think they are considered complex as Valve's paper and many others just mention those artifacts as if anyone reading the paper should already understands the ins and outs. I would appreciate if someone can hint me to a topic in mathematics (books or the like) or articles/videos that discusses those things deeply because I feel I am missing so much background on this topic. (Topics that comes to mind is implicit surface representation and image processing, but not how relevant are they)