Hi,
Is there a way to access custom vertex attributes from shader graph?
Thanks in advance.
Hi,
Is there a way to access custom vertex attributes from shader graph?
Thanks in advance.
I came here hoping to find the answer. I’m guessing you are a seasoned professional Unity dev by now, but I’ll throw in my two cents anyway.
I think that the only channels for attributes are Vertex Color, and UV channels. So if you have your own custom float or Vector2, you’d just store it in one of the UV channels. If you have a Vector3, store it in Vertex Color.
You can get all vertex attributes via shadergraph, (except bone weights I think) via Geometry nodes, (Input- Geometry) including vertex index.
For custom ones, good idea to pack custom data into one of the extra uv channels or color if you dont need the actual color.
I use color for vertex masks sometimes.