mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-21 20:08:40 +03:00
Added spot light type 🔦 & light direction now using global rotation
This commit is contained in:
@@ -63,6 +63,7 @@ public:
|
||||
ComponentTableReset(component.Type, Nuake::LightType::Point);
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
if (component.Type == Nuake::LightType::Directional)
|
||||
{
|
||||
{
|
||||
@@ -100,6 +101,33 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (component.Type == Nuake::LightType::Spot)
|
||||
{
|
||||
{
|
||||
ImGui::Text("Cutoff");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::DragFloat("##cutoff", &component.Cutoff, 1.0f, 0.0f, 360.0f);
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
// Clamp inner angle so it doesnt exceed outer angle.
|
||||
component.Cutoff = glm::min(component.Cutoff, component.OuterCutoff);
|
||||
|
||||
ComponentTableReset(component.Cutoff, 12.5f);
|
||||
ImGui::TableNextColumn();
|
||||
}
|
||||
|
||||
{
|
||||
ImGui::Text("Outer Cutoff");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::DragFloat("##outercutoff", &component.OuterCutoff, 1.0f, component.Cutoff, 360.0f);
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ComponentTableReset(component.OuterCutoff, 30.0f);
|
||||
ImGui::TableNextColumn();
|
||||
}
|
||||
}
|
||||
}
|
||||
EndComponentTable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user