Radial Gradient?

Blitz3D Forums/Blitz3D Programming/Radial Gradient?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm trying to make a radial gradient to use as a texture for my game character shadow. I want to be able to pass a number to a function to make the gradient using the number of given colours. For example CreateGradient (5) would make a gradient with 5 steps, CreateGradient (100) would make a gradient with 100 etc

Only needs to be black and white. And the gradient needs to always fill the whole 256 x 256 texture with 2d drawing commands only. Something like this:



Could somebody please help me out?

Thanks