diff --git a/README.md b/README.md index 29c8895b..98545c5d 100644 --- a/README.md +++ b/README.md @@ -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 and shadow mapping](deferredshadows/) + + +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. +

+ ## [Shadow mapping](shadowmapping/) diff --git a/screenshots/deferred_shadows.jpg b/screenshots/deferred_shadows.jpg new file mode 100644 index 00000000..ee174960 Binary files /dev/null and b/screenshots/deferred_shadows.jpg differ