Gentlemen / gentleladies,
Each time when not taking attention, the 3D-rendering world has been drastically changed, so I wondered what the current / common way of shadowmapping is.
About seven years ago, I implemented "Variance Shadowmapping". Basically rendering a depthMap for each shadow-casting lightsource (spotlights / point lights), and then doing a depthtest to determine whether a given position is shaded or not. And some additional math for the soft edge.
My main issues with doing ShadowMapping this way, are:
- Got to render a depth-pass (possibly each cycle) for all contributing lights (and more than 1 for point-lights!)
- Testing which lights actually attribute (directly) can be tricky - in cases where the light is out of sight, but its shadows aren't
- Looping through lights in a single pass requires either a lot of shadowMap(depth) textures, or all maps being packed in one bigger "atlas" texture
- Depth-testing requires some margin to avoid banding or self-shading issues. But this margin can also lead to "leaks"
- Quality suffers over distance due limited texture resolutions (typically my maps are 256, 512 or 1024 ^2)
The distance issue can be partially solved by using cascaded-shadowMaps, but so far I only use that for one "major light" (usually the sun or moon), due its additional complexity. The leaking / accuresy problem might be fixed with 32 bit maps (I only tried 16 bit so far). Don't know if that is standard nowadays.
Is "ShadowMapping" (and the listed problems) still the case? Or are there better/smarter/faster/nicer ways these days? I've been reading bits about "Physically Based Rendering" and "Image Based Lighting", but I don't see how that would solve or improve this problem, as -correct me if I'm wrong!!- IBL is based on (pre)baked probes/nodes/cubeMaps, and PBR is a global term for replacing dirty hacks with a more realistic range of values, parameters, and techniques.