The Best way to do Dynamic Lighting without HW shaders

Started by
4 comments, last by Oni 21 years ago
Yeah, this is quite a tough question. I imagine there are many ways to do dynamic lighting nowadays and i''ve seen plenty myself. Im just wondering which method people think it best. Is an offline radiosity solution with semi dynamic lighting a good idea (i.e a static lightmap with another dynamic one blended on to it) or not? Are stencil shadows old hat now or do they provide a good solution on todays hardware? Basically, it seems to me that there are a lot of methods. Shaders seem to be the big thing but my poor geforce4 440 go wont hack it and i guess other cards may have problems with them too. Does anyone have any suggestions? I realise it might be a big question. Cheers
If its your first night, you have to fight!
Advertisement
Yup, GeForce2s and below, and GeForce4 MX chips like the 440 Go, do not support vertex/pixel shaders. For that reason I do not like engines that rely on them... I have a GeForce2 Go myself, that's why Us laptop users cannot upgrade unless we pay $2200 for a new laptop.

Ideally you would write pixel shaders for lighting and fall back on another solution for cards that don't support them. But you'd have to find a system you can write the shaders on.

~CGameProgrammer( );



[edited by - CGameProgrammer on May 4, 2003 2:33:04 PM]
~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Ah cool. Cheers for the headsup. Thing is, what about newer games that still work on such cards? I mean most 1st person shooters and games like NWN still work, and work well on my little system. It "appears" that Neverwinter Nights has dynamic lighting and the result is pretty good. Im wondering perhaps how they managed to do it.
If its your first night, you have to fight!
What''s wrong with SetLight() and LightEnable()? You don''t need hardware lighting for them to work. Also, you could compute the vertex colors yourself (just like you would in a shader). Or use the software shader-emulation. Both AMD and nVidia have provided optmized code for their chips that emulate shaders. Emulating pixel shaders will be too slow, but just vertex shader lighting should be fine. Avoid specular highlights with software devices though, as it takes quite a long time to compute (relative to diffuse only).

Tons of different approaches are possible.
Vertex shader emulation is a good idea, but vertex lighting is not always good. The lighting is not precise unless the vertices are very close together. That''s why lightmaps are used instead of just static vertex lighting, for static lighting.

Anyway, for something like a spotlight or a glow from an object, dynamic lightmaps should work fine. You use a generic round lightmap and display it at the right scale and color.

~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
i think intel has cpu vertex processing solution

[edited by - DirectXXX on May 5, 2003 5:03:13 AM]
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de

This topic is closed to new replies.

Advertisement