-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSHADOWS.txt
More file actions
53 lines (46 loc) · 2.14 KB
/
SHADOWS.txt
File metadata and controls
53 lines (46 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Shadow Techniques
=================
SUMMARY:
Shadow mapping is easier, faster, and extendable (into CSM or PSSM) later on.
Shadow Mapping:
Basically:
1) For each light, create a depth buffer by rendering all geometry from it's
view perspective (using orthographic for directional lights).
2) Shade each fragment with reference to that depth buffer, and calculate if
it is in shadow of that light or not.
3) Use multiple passes, rather than multiple depth buffers, and alpha blend
the results. But this means multiple shading per pixel!.
* Does not require stencil
* Can have a soft edge (happens when sampling depth buffer)
* Resolution limitations and FOV limitations (FOV of the light).
* Faster then stencil shadowing when there are lots of objects, but often slower
with few objects.
* Can consider transparency (leaves allowing some light through).
Cascaded shadow maps (2006):
* Developed to combat perspective aliasing.
* 2 options for filtering: Percentage Closer Filtering & Variance Shadow Maps.
* Requires multiple samples from the shadow map and blending.
Parallel Split Shadow Maps (PSSM 2006/2007):
* Combats aliasing (purpose)
* Has soft edges without requiring multiply sampling the shadow map!
* https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html
* Split the view frustum into multiple depth regions, and render a shadow map
for each region.
Shadow Volumes (Stencil Shadows): popular since ~2010
Basically:
1) For each light, compute the volume of space that the light can or cannot see, as
a geometry.
2) Render entire scene in shadow
3) Render entire scene once per light:
a) Stencil buffer out where the shadow geometries are found to match the depth buffer.
b) render where stencil is not, alpha blending the result
* Pixel-accurate
* Requires stenciling
* Closed mesh requirement
* Shadows on the back sides of objects have some kind of restriction, not sure what.
* Cannot consider transparency.
Sascha Willems has examples for:
deferredshadows
shadowmapping
shadowmappingcascade
shadowmappingomni