Just wondering, is there a way to implement per-pixel lighting without the use of pixel shaders? I'm just thinking of a fall-back method for cases when hardware support is lacking.
GL_ARB_texture_env_dot3 instead of using fragment programs?
Even if you can pull off per pixel lighting w/o shaders, I think the software solution would be slow as hell on a machine without tech new enough to run shaders.
You wouldn't run XP on a 486... at least I wouldn't...
Seems kinda like a lost cause.
dynamic lightmapping is always an option, although the implementation of such system is quite complex.
In DirectX8, you can use the texture stage setups to do simple per-pixel diffuse lighting in 2 or 3 texture stages, which works on GeForce1 and higher.
Here are some slides that help explain.
Nehe's Lesson #22 is a good example.
In this lesson, Extensions like Multitexture, Cube Mapping, GL_ARB_texture_env_dot3, are used to do bump mapping.
I wrote a program awhile back that does dynamic per-pixel lighting including normal mapping (no specular) using ARB_texture_env_combine and related extensions. It takes 4 texture units to do in 2 passes, but I think you can also make it work (using destination alpha to cache intermediate results) in 3 passes, using only 2 texture units. I can post if you want to look at some sample code.
This IOTD comes to mind...
Using Pixel Shaders is the most convenient & customizable way for Per-Pixel Lighting Fx like diffuse & Specular Normal Mapping.
The next thing that comes to my mind is with Register Combiners. We can use them to achieve proper real-time lighting by configuring the multi-texture combiners to perform the per-pixel math. Main disadvantages are that they are nVidia only & D3D does not support them directly. But, on nVidia cards, Register-Combiner paths are faster than Pixel-Shader paths. This is the reason why engines like Abducted use Reg-Combiners for their real-time lighting engine on nVidia cards. For ATI cards they use Shaders.
I think it is similar with Doom3 Engine as well.
Check out http://www.r3.nu/ for Cass Everitt's work on per-pixel shading without anything more than OpenGL 1.1 compliant hardware.