What exactly IS shadowmap? #35
|
Hello! Taking a look at the annotated code and renderdoc and can't tell exactly what shadowmap is, and how it differs from normal lighting. (like IN_shLighting). Like vaguely map of shadows and lighting but the exact details are unclear honestly. |
Replies: 1 comment 1 reply
|
Shadow mapping records the closest depth of each point from the perspective of the light and the camera. The two depth values can be compared to determine if a pixel is "in shadow" or not. This requires a position attribute for both the regular position and a separate shadow map position. The "shadow map" is just the depth texture of the scene rendered from the light's perspective. This is a standard technique, which you can read about below. |
Shadow mapping records the closest depth of each point from the perspective of the light and the camera. The two depth values can be compared to determine if a pixel is "in shadow" or not. This requires a position attribute for both the regular position and a separate shadow map position. The "shadow map" is just the depth texture of the scene rendered from the light's perspective. This is a standard technique, which you can read about below.
https://learnopengl.com/Advanced-Lighting/Shadows/Shadow-Mapping