Lightmaps and per pixel lighting
What goes wrong? explain and show us a screenshot or so.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
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?
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?
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.
For your application you could either add the flashlight lightvalue together with the lightmap, or take the brightest value of the two.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement