Improved SSAO

This commit is contained in:
antopilo
2023-03-13 22:18:00 -04:00
parent 16bb074a5f
commit e78edb7052
4 changed files with 86 additions and 9 deletions

View File

@@ -548,6 +548,22 @@ namespace Nuake {
if (env->SSAOEnabled)
{
ImGui::TableNextColumn();
{
// Title
ImGui::Text("SSAO Strength");
ImGui::TableNextColumn();
ImGui::DragFloat("##SSAOStrength", &env->mSSAO->Strength, 0.1f, 0.0f, 10.0f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string resetRadius = ICON_FA_UNDO + std::string("##resetStrength");
if (ImGui::Button(resetRadius.c_str())) env->mSSAO->Strength = 2.0f;
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
@@ -579,6 +595,38 @@ namespace Nuake {
if (ImGui::Button(resetBloomThreshold.c_str())) env->mSSAO->Bias = 0.025f;
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
ImGui::Text("SSAO Area");
ImGui::TableNextColumn();
ImGui::DragFloat("##SSAOArea", &env->mSSAO->Area, 0.0001f, 0.0f, 0.5f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string resetBloomThreshold = ICON_FA_UNDO + std::string("##resetSSAOArea");
if (ImGui::Button(resetBloomThreshold.c_str())) env->mSSAO->Area = 0.0075f;
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
ImGui::Text("SSAO Falloff");
ImGui::TableNextColumn();
ImGui::DragFloat("##SSAOFalloff", &env->mSSAO->Falloff, 0.0001f, 0.0f, 0.5f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string resetBloomThreshold = ICON_FA_UNDO + std::string("##resetSSAOFalloff");
if (ImGui::Button(resetBloomThreshold.c_str())) env->mSSAO->Falloff = 0.0022f;
ImGui::PopStyleColor();
}
}
if (env->BloomEnabled)