Can someone give me a clever way to do fast shadow mapping from multiple objects, meaning that they may overlap and that some shadow pixels only are partial occluding. Also, fogging must be applied. It should follow this algorithm:
Color_out = Color_tex*(lightColor_sun + Color_ambient)(1-fog) + fog*Color_fog
So it must a algorithm that supports multiple passes. Please think a little before jumping to conclusions rapidly
exactly how long should we think before we jump to a conclusion?
i (+ perhaps others) cant find this unclear
‘Can someone give me a clever way to do fast shadow mapping from multiple objects, meaning that they may overlap and that some shadow pixels only are partial occluding. Also, fogging must be applied.’
Unclear? Imagine a terrain with vegetation. Each piece of vegetation has a shadow map, which should be cast onto the terrain. It should be done in a way so that shadow overlapping works. Each shadow map may contain pixels which are only partially in shadow. Btw the terrain has its own shadowmap. So “light” in the equation is the result of several shadow maps.
I think you’re confusing the terms shadowmap and lightmap. An object doesn’t have a shadowmap, shadowmaps belong to light sources. They are nearly always dynamically generated and are projected onto the geometry.
So you don’t have a shadowmap for each piece of vegetation, you have a shadowmap for each lightsource, each containing the whole vegetation plus the terrain from the point of view of the light. And this is cast both onto the vegetation and the terrain for final rendering…