How to change the scale of dots in a shader in gradient-like pattern? I ran into a problem while making a toon shader. I wanted to add specular made out of dots, where central spot of the specular will have larger dots, while the specular border will have tiny dots. In other words, I want the dot size to be dynamic, based on the size of the specular.
I couldn't produce it, but if anyone knows how to do it, I would be grateful for a method.
Bellow is the simplest setup of some dots and as you can see I tried using gradient texture and plugging it into a scale input of the voronoi texture. That of course did not work. I'm guessing the solution is in multiple math nodes after the voronoi texture.
I'm also adding an image which showcases my goal.
This setup is far from perfect but can give you some direction :

The trick is to use the &quot;Shader To RGB&quot; node to convert the lighting result into some usable value. This is an Eevee-only node.
For a greater variety of sizes, you can add more Voronoi textures and mix them in cascade, with greater then greater values in the top GreaterThan nodes.
I didn't manage to get a cleaner transition between the zones (some dots are cut in half, that doesn't look good).