Plotting a function in openGL



I remember being intrigued back in the day about how did the Graph Plotter node in Unreal Engine worked.
I always saw that due to the uneven UVs aspect ratio it created glitches, stretching the plotting line.
This is obviously a minor issue, but I tried to research how to avoid this.

It turns out that using the gradient of the function can fix this, because it creates a "height map" following the line of biggest grow.
The maths behind this require a good background in algebra and it is very nicely explained in the following link at Iñigo Quilez website (a great source of computer graphics knowledge).

https://iquilezles.org/www/articles/distance/distance.htm

He also implemented it very nicely in this link:
https://www.iquilezles.org/apps/graphtoy

I will have a look in the future at filly implementing this in Unity.

Have a great rest of your day,

Season 4 of Talking Tom and Friends Finale is here!!

We have finally launched the last episode for this season! I am very happy to be working with such an amazing team with people coming...