Hey,
i try to implement shadows in my application.
But the shadow resolution is very bad if i have a shadowmap with width = 1024 and height = 1024.
It looks like i have really big black pixels on my Objects.
If i set the width and height to 20480, it looks much more better.
Any guy know what i doing wrong? i dont want create a shadowmap of 20480 width and height.
i followed the tutorial of learnopengl
Mismatched shadow resolution between light space and camera screen space is one of the problems of standard shadow maps. If you do some reading on them (and you should), you’ll find quite a few methods for addressing this including cascaded shadow mapping, shadow map filtering, limiting the spatial size of the shadow map, increasing resolution, and using alternate shadow map representations, just to name a few.
1 Like
Many solutions to resolve this kind of problem, like:
-
filtering
- Variance Shadow mapping: http://developer.download.nvidia.com/SDK/10/direct3d/Source/VarianceShadowMapping/Doc/VarianceShadowMapping.pdf
- Exponential Shadow Mapping: http://jankautz.com/publications/esm_gi08.pdf
- Percentage-Closer Soft Shadows: https://developer.download.nvidia.com/shaderlibrary/docs/shadow_PCSS.pdf
and so on …
-
Light Camera optimisation
- Cascades Shadow Map: https://developer.download.nvidia.com/SDK/10.5/opengl/src/cascaded_shadow_maps/doc/cascaded_shadow_maps.pdf
- Good technical blog (a bit old but relevant): “Common Techniques to Improve Shadow Depth Maps” => Common Techniques to Improve Shadow Depth Maps - Win32 apps | Microsoft Learn
- Perspective Shadow Maps: http://igm.univ-mlv.fr/~biri/Enseignement/IMAC3/Donnees/PSM.pdf
- Light Space Perspective Shadow Maps: https://www.cg.tuwien.ac.at/research/publications/2004/Wimmer-2004-LSPM/Wimmer-2004-LSPM-Paper.pdf
and so on
Many many good papers and techniques, you have to experiment and see if one or many can solve your (specific) problem.
Good luck.