1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Updated tutorial_shadow_mapping (markdown)

reduz
2014-06-22 17:22:07 -07:00
parent fa0955a4b8
commit fcf9a18726

@@ -27,6 +27,8 @@ An alternative technique is PSM (Perspective Shadow Mapping). This technique is
Omnidirectional lights are also troubesome. How to represent 360 degrees of light with a single texture? There are two alternatives, the first one is to use DPSM (Dual Paraboloid Shadow Mapping). This technique is fast, but it requires DISCARD to be used (which makes it not very usable on mobile). DPSM can also look rather bad if the geometry is not tesselated enough, so more vertices might be neccesary if it doesnt'r look tight. The second option is to simply not use a shadow map, and use a shadow cubemap. This is faster, but requires six passes to render all directions and is not supported on the current (GLES2) renderer.
<p align="center"><img src="images/shadow_omni.png"></p>
As few considerations when using DPSM shadow maps:
* Keep Slope-Scale on 0.
@@ -38,6 +40,8 @@ As few considerations when using DPSM shadow maps:
Spot light shadows are generally the simpler, just needing a single texture and no special techniques.
<p align="center"><img src="images/shadow_spot.png"></p>
## Shadows Parameters
The fact that shadows are actually a texture can generate several problems. The most common is Z fighting (lines at the edge of the objects that cast the shadows. There are two ways to fix this, the first is to tweak the offset parameters, and the second is to use a filtered shadow algorithm, which generally looks better and has not as many glitches, but consumes more GPU time.