Added deferred shadow example to the readme

This commit is contained in:
saschawillems 2016-07-19 22:52:24 +02:00
parent ec800e3496
commit ac7a902c41
2 changed files with 10 additions and 0 deletions

View file

@ -175,6 +175,16 @@ Demonstrates the use of multiple render targets to fill a G-Buffer for a deferre
Deferred shading collects all values (color, normal, position) into different render targets in one pass thanks to multiple render targets, and then does all shading and lighting calculations based on these in screen space, thus allowing for much more light sources than traditional forward renderers. Deferred shading collects all values (color, normal, position) into different render targets in one pass thanks to multiple render targets, and then does all shading and lighting calculations based on these in screen space, thus allowing for much more light sources than traditional forward renderers.
<br><br> <br><br>
## [Deferred shading and shadow mapping](deferredshadows/)
<img src="./screenshots/deferred_shadows.jpg" height="96px" align="right">
Building on the deferred shading setup this example adds directional shadows using shadow maps from multiple spotlights.
Scene depth from the different light's point-of-view is renderer to a layered depth attachment using only one pass. This is done using multiple geometry shader invocations that allows to output multiple instances of the same geoemtry using different matrices into the layers of the depth attachment.
The final scene compositing pass then samples from the layered depth map to determine if a fragment is shadowed or not.
<br><br>
## [Shadow mapping](shadowmapping/) ## [Shadow mapping](shadowmapping/)
<img src="./screenshots/shadowmapping.png" height="96px" align="right"> <img src="./screenshots/shadowmapping.png" height="96px" align="right">

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB