Screenshot and updated description for shadow mapping example

This commit is contained in:
saschawillems 2016-06-05 16:41:42 +02:00
parent 4c9c5478d4
commit c85413f893
2 changed files with 5 additions and 3 deletions

View file

@ -169,8 +169,10 @@ Deferred shading collects all values (color, normal, position) into different re
## [Shadow mapping](shadowmapping/)
<img src="./screenshots/shadowmapping.png" height="96px" align="right">
Shows how to implement directional dynamic shadows with a single shadow map in two passes. Pass one renders the scene from the light's point of view and copies the depth buffer to a depth texture.
The second pass renders the scene from the camera's point of view using the depth texture to compare the depth value of the texels with the one stored in the depth texture to determine whether a texel is shadowed or not and also applies a PCF filter for smooth shadow borders.
Shows how to implement dynamic shadows from a directional light source in two passes. The first pass renders the scene depth from the light's point-of-view into a separate framebuffer attachment with a different (higher) resolution.
The second pass renders the scene from the camera's point-of-view and compares the depth value of the texels with the one stored in the offscreen depth attachment (which the shader directly samples from) to determine whether a texel is shadowed or not and then applies a PCF filter to smooth out shadow borders
To avoid shadow artifacts the dynamic depth bias state ([vkCmdSetDepthBias](https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetDepthBias.html)) is used to apply a constant and slope dept bias factor.
## [Omnidirectional shadow mapping](shadowmappingomni/)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Before After
Before After