I got a question in a test for a job and it seems that if there is 2 lights and 1 shadow, there is not inevitably 2 shadows. Is that true ? Is there limitation with webglRenderer ?
Thanks
Shadow maps are manually enabled per light… so you can enable them for more than 1 light.
There probably is a limit to number of shadowcasting lights but I don’t know what it is.
Shadow casting lights are expensive though so you generally want to keep them to an absolute minimum like < 4… and heavily control the shadowmap size… i.e. dont use 4k shadowmaps, more like 1k or 2k max… and carefully control their coverage so they only cover the parts of the scene you need them to, as to not waste detail.
They are expensive because shadowmapping will re-render your entire scene to generate the shadowmap, so each shadowmapped light = 1 scene re-render.
hth
2 Likes