Transferring all those points to the shader might be a bit heavy. I would recommend calculating the curve itself inside the shader to simplify the process (unless the math is somehow super complicated)
If you don’t mind reading some GLSL there are plenty of examples of graphing a line on shadertoy, such as this one or this one that should help you to achieve just that.
Ideally it’d be better to avoid doing it in the Shader at all, what we really want is some kind of 2D Spline Component that lets us draw a material over it.
I would use Slate’s built-in spline drawing capability we use in the blueprint editor. Not currently exposed as a blueprint function, so you’ll need to write a paint function for it in C++ that’s exposed to blueprints and do it in a Widget’s OnPaint.
Ah okay, not used Slate in C++ at all yet so that’ll be a learning experience for one or all of us haha.
Could we write a custom ‘Widget Component’ (Not sure what the real terminology is, like the Text Box, Border etc. that just takes in a bunch of points and draws the spline between them? Essentially that’d be the most modular/reuseable option.
Hey Nick! Thanks for the advice, i had a cheeky google and couldnt find a starting place for spline and slate ui in UE4. Are there any resources that directly reference it use that you know of, time for me to upgrade from C#