Download

Pattern searching in material / shader

Hi,

This might be a pretty n00b question, I’m coming from the programming side of things and starting to learn materials and shaders.

Lets say I have a texture with a pattern on it, a black and white voronoi pattern for this example. If I take in a point on that material, how can I flood out that section of the pattern and return a rough bounding shape, say a sphere or box?
So in this example, it would start on a white pixel, and move outwards until it hit a black pixel.

1f4104d751dafa78d1abe74d26a2d92891d1693b.jpeg

Any point in the right direction, would be great.

Thanks,
Dave