#Trying to create a UI shadergraph and the vertex stuff is greyed out
1 messages · Page 1 of 1 (latest)
its also just not showing anything on my image
I think you might need to use the base vertex position somewhere?
Also, does it not say anything if you hover over the greed out block?
sorry, was asleep. recorded a video showing you
if i set the material type to UI it specifically says that position is nota llowed
but no such thing for the canvas material
its just grayed out and doesnt say why
Aaah, well that makes sense. Canvas and full screen don't really "have" vertices. Or rather their vertices are basically that of the screen corners. You can't modify them.
ah, shame. I wanted to make some uneven shapes like this procedurally
i guess i could do this in a non UI context lmao but
i wanted to do this in my UI
You need to cutout the shape in the pixel shader
There might be a proper way to do this with ui shader.
which part is the pixel shader? do you mean this section?
would be nice, maybe something calculated within the bounds of a square like remy is saying
"fragment" is the other name of the pixel shader.
So using the alpha output to shape the button like you want is the way to do it.
You can have a look a shadergraph UI samples for inspiration.
sweet thanks! so basically i want to calculate my own quad, mess with the positions of the vertices and then use that output in the alpha?
Well, you can't modify the position of the vertices in the fragment stage.
You take the uvs, mess with them in maths, and make it a greyscale alpha mask.
ah okay, thanks! sorry im still new to shader grpah, which nodes would be useful here?
Oh boy ...
Maybe start by looking at the UI samples (in the samples tab when looking at the shadergraph package in package manager).
Depending on the shape that you want, the logic involved might change a lot
Maybe at the end it might be simpler to work with a texture ?
(uGUI) visual components have individual geometry the same way sprites do
Not sure why modifiying the positions would be forbidden
Other than that very easily having unintended results
Yeah, I was mainly commenting about canvas and fullscreen graphs that they were picking in the video first.
I don't know why that would be the case with the ui shader graph.
Ah, with fullscreen yes
But canvas graph is the same as "UI graph" isn't it
Not sure what the difference is, but there's both "ui" and "canvas".