Rounded brick/pill procedurally?

I’m looking to make a pattern that is Basically just a brick pattern, but with fully rounded ends, so that each “brick” is a pill shape.

voronoi smooth f1 euclidean with a color ramp gives nice spaced out circles, but I need pills. And Preferably in an offset pattern.
Any good resources on how to go about accomplishing something like that?

Check out Erindale’s youtube tutorial on how to make bricks procedurally.

You could probably do that quite easily using the experimental SDF textures

@LazyDodo 's Brick tricks addon has a rounded corner option that does this.