There are some rounded corner artifacts on the edge of the grid:

It’s much more visible with a coarser grid:

I think it’s because we assume that outside the grid, the value is effectively -Infinity (or NaN). It would be nicer if we simply repeated the edge value infinitely (like WebGL CLAMP_TO_EDGE) so that we got square corners.
/cc @Fil