I am trying to get into antialiasing in my shaders, but I don’t know if I understand this function. I understand that dfdx() and dfdy() return the derivative (slope) of a varying parameter in screen space.

But for example, what is the use of the following which appears in a shader I’m studying:

fwidth(fragmentWorldPosition.y)

Thanks for any help wrapping my brain around this.