- Home /
Flexible border with changeable color of line,Flexible border with changeable color
I need to create random-shaped (could be rectangular or circular) border for my UI, which can change its size, thickness and color of line. What approach to choose?
9-slice scaling texture is not an option since I need to change colors of line and background dynamically.
Write my own shader - I tried to dive into it and I think I'm not up to it right now. Also I was unable to find shader like this made by someone else.
Create border as a mesh, which is probably expensive in GPU resources.
This must be very common task, I really need advice from experienced unitist. How would you do this? Thanks. ,I need to create random-shaped (could be rectangular or circular) border for my UI, which can change its size, thickness and color of line. What approach to choose?
9-slice scaling texture is not an option since I need to change colors of line and background dynamically.
Write my own shader - I tried to dive into it and I think I'm not up to it right now. Also I was unable to find shader like this made by someone else.
Create border as a mesh, which is probably expensive in GPU resources.
This must be very common task, I really need advice from experienced unitist. How would you do this? Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220612222533im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
UI masking in a jet fighter HUD 0 Answers
UIToolkit UIProgressBar methods changed 0 Answers
Builtin Shader UI/Unlit/Transparent Yellow Pixels Read As White 0 Answers
Render sorting issue when ui canvas in -y rotation VR 0 Answers
Quad with outline shader? 1 Answer