07 July 2005, 03:58 PM
I just implemented lightmapping into my 3D Engine. Looks great, what I am wondering now is the best way to implement these results with a PixelShader Cg program so that I can also add on top of this specular, and bump mapping. I have not seen any information anywhere that shows how to combine static lightmapping with other techniques for dynamic lights to achieve other lighting effects besides standard diffuse lighting. My only idea for this is to modulate the lightmap onto the diffuse texture(Standard LM Procedure with GL MultiTexturing), then do my Cg program on this information, or just the standard diffuse map first? I am a little confused when/how all this will be blended together, if it has to be Multi-pass, and what information to run the Cg shader lighting program on.
Also, I know that lightmaps are slowly starting to fade out of the scene in favor of PixelShaders , but I am rendering VERY large/complex indoor environments, with 100's of visible lights(static), so I can't JUST do all of this work in Cg. But I would like to get a little better specular, and bump mapping with just a few dynamic lights somewhat representing the 100's of static lights.
Any help/guidance would be appreciated.
Thanks in advance,