Advertisement

Lightmaps and per pixel lighting

Started by December 13, 2004 01:33 PM
11 comments, last by lc_overlord 19 years, 11 months ago
What goes wrong? explain and show us a screenshot or so.
i would like to use lightmaps for static shadows (and this is ok), but i want to light a surface with a lightmap on it as if it was a normal shadow... i don't know if i've been able to explain it...
imagine a simple surface with a shadow on it (in my case the shadow is made by a lightmap). If you move any kind of lightsource near this surface, the shadow should disappear. There's a way to get this using fragment programs? I've seen that Doom 3 uses lightmaps for some small static shadows, and when the player points the flashlight on them, they are lighted. How can this be done?
Advertisement
actuarly, doom3 uses no static shadows, and if it did, doom3 uses additive lighting witch means that all lightsources are renderd separatly and then blended together with a GL_ONE GL_ONE filter.

For your application you could either add the flashlight lightvalue together with the lightmap, or take the brightest value of the two.

This topic is closed to new replies.

Advertisement