Added back tonemapping

This commit is contained in:
Antoine Pilote
2024-04-28 18:17:09 -04:00
parent c55854ca61
commit 5216daed48
7 changed files with 361 additions and 310 deletions

View File

@@ -324,6 +324,21 @@ namespace Nuake {
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(2, 2));
ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 0));
if (ImGui::Button(ICON_FA_ARROWS_ALT, ImVec2(30, 30)) || Input::IsKeyDown(Key::W))
{
CurrentOperation = ImGuizmo::OPERATION::TRANSLATE;
}
ImGui::SameLine();
if (ImGui::Button(ICON_FA_SYNC_ALT, ImVec2(30, 30)) || Input::IsKeyDown(Key::E))
{
CurrentOperation = ImGuizmo::OPERATION::ROTATE;
}
ImGui::SameLine();
if (ImGui::Button(ICON_FA_EXPAND_ALT, ImVec2(30, 30)) || Input::IsKeyDown(Key::R))
{
CurrentOperation = ImGuizmo::OPERATION::SCALE;
}
ImGui::SameLine();
ImGui::Dummy({ ImGui::GetContentRegionAvail().x / 2.0f - (76.0f / 2.0f), 8.0f });
ImGui::SameLine();
@@ -720,6 +735,40 @@ namespace Nuake {
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
ImGui::Text("Gamma");
ImGui::TableNextColumn();
// Here we create a dropdown for every sky type.
ImGui::DragFloat("##gamma", &env->Gamma, 0.001f, 0.0f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string ResetType = ICON_FA_UNDO + std::string("##ResetType");
if (ImGui::Button(ResetType.c_str())) env->CurrentSkyType = SkyType::ProceduralSky;
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
ImGui::Text("Exposure");
ImGui::TableNextColumn();
// Here we create a dropdown for every sky type.
ImGui::DragFloat("##exposure", &env->Exposure, 0.001f, 0.0f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string ResetType = ICON_FA_UNDO + std::string("##ResetType");
if (ImGui::Button(ResetType.c_str())) env->CurrentSkyType = SkyType::ProceduralSky;
ImGui::PopStyleColor();
}
if (env->CurrentSkyType == SkyType::ProceduralSky)
{
ImGui::TableNextColumn();