Shadow Mapping
- marcindziedzic
- 12 lis 2018
- 1 minut(y) czytania
I have implemented shadow mapping few weeks ago, but was working on other things so post it now. Right now, shadow mapping is implemented only for directional lights. The idea is easy, but not so easy is to implement it properly. All scene (in simplified form) is rendered to depth texture from light's perspective. That gives us information about the distance of the geometry that is "seen" by light. After that, the thing is easy. We just check if the fragment is in the shadow, by comparing its depth with depth in shadow texture. The only problem is that we need to calculate camera position and orientation, to render only scene that is seen by main camera. It is important to improve shadows resolution.
I really don't like this technique. It depends on shadow texture resolution, you have to remove aliasing, artifacts, self-shadowing problems, calculate appropiate camera position and direction. All of this to achieve obvious thing like shadows. I hope i will find time to play with shadows in different way.






Komentarze