Geometric mask and vertex color

Hello!
I’m trying to create a shader, that adds a staircase affect to vertex color mask.
The setup below creates an uv grid that “pixelates” the texture input.


How could I achieve a similar effect with vertex color node, which has no UV input?
image
My idea is to use this tile mask and compare the color in every tile with vertex color, however I don’t know how to compare values per tile and not per pixel.

This whole setup will be used to blend tile texture with a bare wall texture, to create an effect of tiles that fell off from the wall. All kinds of simpler approaches result in a mask that doesn’t get cut along the tile mask, but creates random shapes

I hope somebody stumbled into this problem before and know the solution :slight_smile:
Cheers

Just an idea.

You need mask that is rasterized exactly to size of tiles.
And there is material function in UIMaterials example from epic that does just that.
Also you can use Power node to make vertex color fall off faster (sharper edge).
And add alpha mask for those tiles that marks where tiles are and where are missing.
If you rasterize vertex color then with such mask you probably can get sharp tile like shapes.

Thanks for your reply! I actually did a similar thing with a random HLSL I’ve found online but its has some issues, maybe this function will wiek better. I’ll check IT on tuesday