EDIT: Forward-Z cascaded shadow map
This commit is contained in:
1 parent
26b7db9030
commit
b419cc1148
3 files changed
+14
-9
No files matched your search
@@ -110,7 +110,9 @@ void SceneManager::update_scene()
|
||||
{
|
||||
using namespace glm;
|
||||
const vec3 camPos = vec3(inverse(view)[3]);
|
||||
vec3 L = normalize(-vec3(sceneData.sunlightDirection));
|
||||
// Use light-ray direction (from light to scene).
|
||||
// Shaders compute per-fragment L as -sunlightDirection (vector to light).
|
||||
vec3 L = normalize(vec3(sceneData.sunlightDirection));
|
||||
if (!glm::all(glm::isfinite(L)) || glm::length2(L) < 1e-10f)
|
||||
L = glm::vec3(0.0f, -1.0f, 0.0f);
|
||||
|
||||
|
||||
Reference in new issue
Block a user