From 32fb0e462795a6b4fd1ee646e2bac56c15de43c3 Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Thu, 17 Jun 2021 16:51:26 -0500 Subject: [PATCH] [ATOM-15810] Removing maximum values from light intensity (#1414) Setting hard max values to float max. Also allowing EV100 values hard minimum to be lowest float. Soft min and max will remain the same for a consistent ux, but we will no longer keep people from manually entering really high or low values that are technically fine. --- .../CoreLights/AreaLightComponentConfig.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp index c9211e87a0..71bb17d6c0 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp @@ -11,6 +11,7 @@ */ #include +#include namespace AZ { @@ -135,23 +136,15 @@ namespace AZ case PhotometricUnit::Nit: return 0.0f; case PhotometricUnit::Ev100Luminance: - return -10.0f; + return AZStd::numeric_limits::lowest(); } return 0.0f; } float AreaLightComponentConfig::GetIntensityMax() const { - switch (m_intensityMode) - { - case PhotometricUnit::Candela: - case PhotometricUnit::Lumen: - case PhotometricUnit::Nit: - return 1'000'000.0f; - case PhotometricUnit::Ev100Luminance: - return 20.0f; - } - return 0.0f; + // While there is no hard-max, a max must be included when there is a hard min. + return AZStd::numeric_limits::max(); } float AreaLightComponentConfig::GetIntensitySoftMin() const