Re: Line and Polyline gradient color feature
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?
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?
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)
voted up! Yes, multi-stop gradient, similar to Unity's would be stellar.
Or, a simpler one for now which would be a couple lerps instead of 1.
So, A->B, B->C, C->D. Below the image shows how we could get a fade on the start and end of the line, with an optional gradient for the interior. It would be quite flexible and cover most of what people would want to do. Especially if this is a vector4(XYZW) which would let us move the positions for start of gradients ect. This could be a Quad option in the enum you have now :)
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?