Hi! I made a system where I spawn particles in circle, and then I created an event to make lines out of the particles.
I use the target position to set where the end of the line is going, but I would like to set a different color between the base of the line and the end. How do I set that?
I know I can sample a gradient based on some value, but I can’t figure out which value, for example the position won’t work (because the particle line itself is always at the base of the line).
Any idea? thanks!
Hello !
There isn’t any builtin way to lerp between two color for a classic Line Output, the color is applied at pixel stage (see this if you are curious). Maybe we should consider to extend Shader Graph integration to Unlit Line (and Point) output, we will consider this feature.
Meanwhile, did you consider to use a particle strip line ? It will automatically interpolate attributes, furtheremore, if you want to create more advanced effect, you can potentially switch to the particle strip quad output which is compatible with a Shader Graph override.


Hi! Thank you for giving me a quick answer!
Yeah for my special case, using the line output and setting the target position was perfect for me, to do what I want with particle strips I will have to spawn particles also at the end of the line and then split the strips to create each individual lines. I knew I could do it but it’s far more complex.
Anyway, I understand the limitation of the line output, thanks for clarifying them!
1 Like