Extracting mask from 1px-line shape (UI Material)

HI.

From a white backround with a black continues 1px line.
I’m trying to create a mask based on a custom line shape, where everything below and including the line is separated.

I know i can offset the uv cords and add offset copies, but for larger textures this is unpractical.

Any clever node setup that can achieve this?