From 885a69710e037e9201ffca511a83d7e65645ce74 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 9 Aug 2021 16:30:52 -0700 Subject: [PATCH] fix typo causing ShadowOptions::shadowFar to not work properly --- filament/src/ShadowMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filament/src/ShadowMap.cpp b/filament/src/ShadowMap.cpp index 6e31de182f..be85240299 100644 --- a/filament/src/ShadowMap.cpp +++ b/filament/src/ShadowMap.cpp @@ -152,7 +152,7 @@ void ShadowMap::update(const FScene::LightSoa& lightData, size_t index, if (params.options.shadowFar > 0.0f) { float n = camera.zn; float f = params.options.shadowFar; - if (std::abs(projection[2].w) <= std::numeric_limits::epsilon()) { + if (std::abs(projection[2].w) > std::numeric_limits::epsilon()) { // perspective projection projection[2].z = (f + n) / (n - f); projection[3].z = (2 * f * n) / (n - f);