Skip to content

Commit

Permalink
[renderer] re-enabled shadow map passes (regression from previous com…
Browse files Browse the repository at this point in the history
…mit)
  • Loading branch information
PanosK92 committed Oct 24, 2024
1 parent 85631a5 commit 8608821
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion editor/Widgets/Properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void Properties::ShowLight(shared_ptr<Light> 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());
Expand Down
4 changes: 2 additions & 2 deletions runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
5 changes: 3 additions & 2 deletions runtime/Resource/Import/ModelImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/World/Components/Light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion runtime/World/Components/Light.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 8608821

Please sign in to comment.