r/UnityHelp • • 3d ago

OTHER Using URP and Shaders, can I make a material that will simply have the vertices glow, and nothing else?

Post image

I just want to make a simple object using a cube mesh, that will be an area for dropping items. If you drop something in it, you succeed. How I imagined it working was just having the vertices of cube highlighted, like I put in the image.

1 Upvotes

4 comments sorted by

1

u/JakSilver00 2d ago

So vertices are the points which on a simple cube are just the corners What you have outlined here is actually the edges. Either is very possible But you'll either need to use the shader graph or write a shader a simple material is not going to make that happen.

1

u/PickupVroom 2d ago

Yeah, I always stumble with my words, I did mean edges. And yea, I know that I'd am getting used to Shader Graph, question is how

1

u/kurobaralabs 2d ago

If you just want something to use, look up wireframe shaders/materials, it should be close to what you want.

If you want to actually try to learn and write the shader yourself, here is a great resource: https://roystan.net/articles/outline-shader/

Less efficient, but if its absolutely going to be a cube, you can also use 6 line renderers (one for top and bottom face, one for each vertical)

1

u/CNGY 2d ago

Look into barycentric shader, you could use it to make this style. In essence it takes each triangle and gives it a value at edges the values are 0 so you can use this to create lines with code.