From 39d03ce87a54bdc9579656efe2d814453de81fd6 Mon Sep 17 00:00:00 2001 From: Olivier Prat Date: Thu, 18 Apr 2019 19:19:38 +0200 Subject: [PATCH] Removed magic number --- libraries/render-utils/src/LightStage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/render-utils/src/LightStage.cpp b/libraries/render-utils/src/LightStage.cpp index d35bc21526..524deaaad2 100644 --- a/libraries/render-utils/src/LightStage.cpp +++ b/libraries/render-utils/src/LightStage.cpp @@ -162,7 +162,9 @@ void LightStage::Shadow::setLight(graphics::LightPointer light) { } void LightStage::Shadow::setMaxDistance(float value) { - value = std::max(1e-3f, value); + static const auto MINIMUM_MAXDISTANCE = 1e-3f; + + value = std::max(MINIMUM_MAXDISTANCE, value); if (value != _maxDistance) { // This overlaping factor isn't really used directly for blending of shadow cascades. It's // just there to be sure the cascades do overlap. The blending width used is relative