Re: Line and Polyline gradient color feature

Avatar
  • updated
  • Under Consideration

Is it possible to have gradient color feature for Line and polyline, such that we can have color variant from outer edge lerping towards center of the line?

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
chris gregan

I'm looking to do something similar, though I just need to fade from the main color at the center of a Line to fully transparent at the edge (so the second color would always just be clear). I'm going to start digging around the shader code to see if I can get this to work - any advice on how to do it?

Avatar
Freya Holmér
  • Under Consideration

Could you elaborate a little on what you mean, more specifically?

it sounds similar to this request (having outer/inner/center colors of each point in the polyline)
or this request (having the color overlay fill)
or this request (multi-color gradients with stops)

Avatar
chris gregan
Sure, I'm looking to draw a colored line that fades from alpha 1 along the center of the line to alpha 0 at the edge of the line, like in this image. I only need to draw a single color fading out to the edge, rather than a gradient between multiple colors.

Avatar
yoonack

I think the pic shown by chris is what I wanted.