Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/Features/LightLimitFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@ static constexpr uint MAX_LIGHTS = 1024;
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
LightLimitFix::Settings,
EnableContactShadows,
EnableLightsVisualisation,
LightsVisualisationMode)

void LightLimitFix::DrawSettings()
{
auto shaderCache = globals::shaderCache;

if (ImGui::TreeNodeEx("Light Limit Visualization", ImGuiTreeNodeFlags_DefaultOpen)) {
if (ImGui::TreeNodeEx("Statistics", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::Text(std::format("Clustered Light Count : {}", lightCount).c_str());

ImGui::TreePop();
}

///////////////////////////////
ImGui::SeparatorText("Debug");

if (ImGui::TreeNode("Light Limit Visualization")) {
ImGui::Checkbox("Enable Lights Visualisation", &settings.EnableLightsVisualisation);
if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::Text("Enables visualization of the light limit\n");
Expand All @@ -43,12 +51,6 @@ void LightLimitFix::DrawSettings()

ImGui::TreePop();
}

if (ImGui::TreeNodeEx("Statistics", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::Text(std::format("Clustered Light Count : {}", lightCount).c_str());

ImGui::TreePop();
}
}

LightLimitFix::PerFrame LightLimitFix::GetCommonBufferData()
Expand Down Expand Up @@ -563,4 +565,4 @@ void LightLimitFix::Hooks::BSWaterShader_SetupGeometry::thunk(RE::BSShader* This
auto& singleton = globals::features::lightLimitFix;
singleton.BSLightingShader_SetupGeometry_Before(Pass);
singleton.BSLightingShader_SetupGeometry_After(Pass);
};
};