diff --git a/editor/Widgets/Properties.cpp b/editor/Widgets/Properties.cpp index 3698518db..8949d5ebb 100644 --- a/editor/Widgets/Properties.cpp +++ b/editor/Widgets/Properties.cpp @@ -351,7 +351,7 @@ void Properties::ShowLight(shared_ptr light) const } //= MAP =================================================================================================================== - if (intensity != light->GetIntensityLumens()) light->SetIntensityLumens(intensity); + if (intensity != light->GetIntensityLumens()) light->SetIntensity(intensity); if (angle != light->GetAngle() * Math::Helper::RAD_TO_DEG * 0.5f) light->SetAngle(angle * Math::Helper::DEG_TO_RAD * 0.5f); if (range != light->GetRange()) light->SetRange(range); if (m_colorPicker_light->GetColor() != light->GetColor()) light->SetColor(m_colorPicker_light->GetColor()); diff --git a/runtime/Rendering/Renderer_Passes.cpp b/runtime/Rendering/Renderer_Passes.cpp index 85608e265..a5b5c5a85 100644 --- a/runtime/Rendering/Renderer_Passes.cpp +++ b/runtime/Rendering/Renderer_Passes.cpp @@ -396,10 +396,10 @@ namespace Spartan { // shadow maps { - //Pass_ShadowMaps(cmd_list_graphics, false); + Pass_ShadowMaps(cmd_list_graphics, false); if (mesh_index_transparent != -1) { - // Pass_ShadowMaps(cmd_list_graphics, true); + Pass_ShadowMaps(cmd_list_graphics, true); } } diff --git a/runtime/Resource/Import/ModelImporter.cpp b/runtime/Resource/Import/ModelImporter.cpp index aa24ce6dc..1397205ac 100644 --- a/runtime/Resource/Import/ModelImporter.cpp +++ b/runtime/Resource/Import/ModelImporter.cpp @@ -628,8 +628,9 @@ namespace Spartan light->SetLightType(LightType::Spot); } - // intensity - light->SetIntensity(LightIntensity::bulb_150_watt); + float lumens = 20.0f; + light->SetIntensity(lumens); + light->SetRange(1.0f); } } } diff --git a/runtime/World/Components/Light.cpp b/runtime/World/Components/Light.cpp index 03d9f5d7a..8ed6c83a7 100644 --- a/runtime/World/Components/Light.cpp +++ b/runtime/World/Components/Light.cpp @@ -337,7 +337,7 @@ namespace Spartan SP_FIRE_EVENT(EventType::LightOnChanged); } - void Light::SetIntensityLumens(const float lumens) + void Light::SetIntensity(const float lumens) { m_intensity_lumens = lumens; m_intensity = LightIntensity::custom; diff --git a/runtime/World/Components/Light.h b/runtime/World/Components/Light.h index 59e5020a1..853a7f872 100644 --- a/runtime/World/Components/Light.h +++ b/runtime/World/Components/Light.h @@ -97,7 +97,7 @@ namespace Spartan const Color& GetColor() const { return m_color_rgb; } // intensity - void SetIntensityLumens(const float lumens); + void SetIntensity(const float lumens); void SetIntensity(const LightIntensity lumens); float GetIntensityLumens() const { return m_intensity_lumens; } LightIntensity GetIntensity() const { return m_intensity; }