Seeking Help with Shader Graph for Canvas Based Shader

Hi there,

I’m exploring Shader Graph but struggling to create a procedural shader for Canvas UI.

I aim to apply it to an Image component to render four rectangles with specific characteristics: the rectangles’ widths should match the Image width, and their heights need to be configurable, decreasing slightly from the first to the last. Same goes for gap between these rectangles.

Any guidance or resources on achieving this would be greatly appreciated.

Thank you!

9661358--1375487--upload_2024-2-24_2-16-25.jpeg

BUMP :frowning:

Hey @jGate99 ,

here are some tutorials on making rectangle shapes with Shader Graph.

Also, if you look into Shader Graph Samples, the Node Reference sample features the math under the Rectangle Node that you can use.

Signed Distance Fields are also something we’re considering to provide in the future.
You can provide some feedback here.

Hope that helps.