Simple per pixel lighting system

BlitzMax Forums/BlitzMax Programming/Simple per pixel lighting system

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.

@fredborg
I will look into the AccumBuffer buffer some more. It does sound like it would be much faster. But then we would have to resort to using opengl outside of max2d and eliminating any use of DX. I'm not sure if that is the best. But I think I will create a version which uses the accumilation buffer anyway.

@tonyg
Yes, I scale the buffer to achieve better framerates, but also to use less video ram. GrabImage/Pixmap is extremly slow.
Light states are very easily added, I just forgot to do so for this upload. I did a test where the image buffer was only updated when a light actualy moved. While the buffer stayed the same the frame rate was near 1000fps when a light moved it dropped very quickly to ~200fps.