Incorrect lightDir vector in lesson 5.3 Shadow Mapping in fragment shader
Vakhtang35 opened this issue · 0 comments
Vakhtang35 commented
We're modelling a directional light source and all lightDir vectors must be parallel to fixed one. So why we're calculating lightDir vector as (lightPos - FragPos) like for spot or point light source?
https://learnopengl.com/code_viewer_gh.php?code=src/5.advanced_lighting/3.1.3.shadow_mapping/3.1.3.shadow_mapping.fs