Realtime Shadow Multisampling OpenGL

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024
  • Example I created demonstrating real time shadows with shadow mapping and edge softening with multi-sampling.
    The image in the bottom left is the shadow map which is an image rendered from the perspective of the camera. The map stores the depth value of the nearest pixel fragment. This image can be sampled in a second pass. If our current fragment has a greater depth distance than the corresponding pixel in the depth map it means the current fragment is obscured from the light source and is therefore shadowed.
    Multi-sampling means not just checking the depth map for the corresponding value, but also some of the surrounding values and then finding the average shadowing value and applying it to the current fragment. It softens the edges of the shadows and reduces edge aliasing. It is also fairly expensive and in a typical application you wouldn't use the number of samples I do in this example.

Комментарии • 1