Per vertex & per pixel lighting

Miscellaneous Forums/General Discussion/Per vertex & per pixel lighting

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.

The difference is exactly what it sounds like. Per pixel lighting means that the lighting value at each pixel can be different. Per vertex lighting means that the lighting value at each vertex can be different, and everything inbetween is just interpolated between the two.

There's no one answer to which you should use. If you're using Blitz3D you should use per-vertex lighting for dynamically lit objects as anything else is cludgy and broken at best. For static objects, you can use either per-pixel ( lightmapped ) or per-vertex, depending on what suits best.

If you're using more powerful 3D engines, then you'll probably want to be using per-pixel lighting, but even then you might find that per-vertex lighting and lightmaps is good enough. Unless you've got the ability to create normal maps for every surface or you can afford to use some kind of expensive dynamic ambient occlusion shader, you're not going to see huge benefits from per-pixel lighting.