MPan, my mistake I thought the image you posted was the final result. And yeh guys remember if you are using this in a panel be sure to disable clipping otherwise you wont see the shadow.
All you have to do is write a proper gradient function, easiest way is to use HSVToColor().
You are “missing” those colors because you linearly interpolate between 2 colors. What happens at 0.5 between red (255, 0, 0) and green (0,255,0)? It’s (128,128,0), not (255, 255, 0) you are expecting.
I know, this is what I was trying to explain to OV3RR1D3. I already made a trashy gradient function months ago. He was trying to help me with it.
At this point I’ve seen more rainbows than when I accidentally click into VanossGaming’s YouTube channel. I don’t really need another explanation on why they look bad. Thanks for the help though.
[editline]3rd October 2017[/editline]
Also, 0V3RR1D3, thanks a lot for trying to help with my trash. I’ll definitely be stealing your code at some point for something.
I still do think it’d really be great if it were on GitHub though. It’d be way easier to find, and others could make changes to it.
You say the code isn’t very good, but there’s no real way to let others improve the code of a static Pastebin post.
If you give me your username, password, mother’s maiden name, phone number, credit card number, expiry date and CVV then I will set up a GitHub repo for free, no questions asked.
Here’s a gradient function for HSV Gradients that are cached to a material:
draw.GradientBox( id, x, y, w, h, from, to, dir )
where id is unique id for caching the gradient
dir is local GRADIENT_HORIZONTAL, GRADIENT_VERTICAL
draw.GradientBox( “RedToBlue128x586”, 0, 0, 256, 256, Color(255, 0, 0), Color(0, 0, 255) )