Animate Line with EdgeRendering


I need to animate the line. I got it all working nicely but I need to controll its thickness.

This is my PG:

When I add EdgeRendering on line 38 My green edge Is rendered and never updated to the animation


of the line that is visible when I remove EdgeRendering.

line animation

I know that a separate shader but can I update it as well as the instance of the line? I already tried to move the points to a shared position so we do not have to animate with alpha but this still is not working.

And I need the useVertexAlpha to be false, this is important cause otherwise, it’s messing my shaders

I know you can do it with a mess, like a tube for instance, but this seems the right way it’s just not updating the edge rendering.


Yeah I get your issue

I think you should use a ribbon instead (A tube) and not use the edgeRendering which is not designed to be animated!

But will ribbon act like a billboard so the thickness will always be the same whatever angle your looking at it?

Not with billboard but as a tube

Yes that’s the problem with this EdgeRendering.

There is realy no way to update the EdgeRendering shader ?

Unfortunately no because this is no shader code, it is all about building the geometry (and then updating it later on)

Can I not update it in every frame of animations somehow?

It’s really helpful for me and will like to use it.

well nothing prevent you from disposing / recreating the edges renderer but it will not be fast

Theoretically how can I do it? cause I was not able to remove the edge at all.


And I got a very strange result if I will use an outline. The outline renders in different place then the line. And that’s definitely a bug.

I also opened TS error with renderOutline cause I can’t use it in my code but it works inside Playground :confused:


So did you investigate the bug with the outline from my PG?

Hi @Deltakosh

So did you got the bug from that PG?

Cause I really need a solution for this.

Or how to modify colorShader to make line always 2, 3, or whatever the value is pixels wide, no matter the coom level to it?

The outline would work good but it’s not positioned properly any update on this one?