Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Oni

The Best way to do Dynamic Lighting without HW shaders

This topic is 5642 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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( );

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!