The main issue is that I think I need to get the rect scale inside the sader and I don’t think Unity natively supports that.
Is it possible to achieve this effect procedurally? I think there is some new UI shadergraph integradion with newer versions of Unity but not sure if what I want can still be achieved. @FredMoreau
It seems you’re using the Dots pattern, which doesn’t have UV input. But if you double click on that node, since it’s a Subgraph, you can go and copy/paste its content.
You can then use a Position node, along with an Object node to get the bounds and do some math, depending if you want a constant screen density, or something that scale with the Canvas.
It’s part of ShaderGraph’s “Procedural Patterns” Sample, that you can install from the Package Manager.
Once installed, you’ll find it under /Patterns/Simple/Dots.