I just found out LaTeX PGF/TikZ has support for shader programming, but you have to write them in PostScript

https://tikz.dev/base-shadings#pgf.back/pgfdeclarefunctionalshading

Shadings - PGF/TikZ Manual