Vertex/image shading (in 2d, based on faked 3d..)

BlitzMax Forums/BlitzMax Programming/Vertex/image shading (in 2d, based on faked 3d..)

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.

Yep, same thing. sqr(x*x+y*y+z*z) is the magnitude, and you're dividing by it and klepto is multiplying by (1 dividided by the magnitude). 6 and two 3s.

To smooth the light colouring, you'll have to look into vertex colouring. I don't know OpenGL or Direct3d, so you're on your own on that one.