[ImGui] Fix fsr sharpness slider scaling
https://github.com/ocornut/imgui/issues/3361#issuecomment-1287045159
This commit is contained in:
parent
c8a39bad29
commit
29985f69e1
|
@ -399,12 +399,17 @@ void EmulatorWindow::DisplayConfigDialog::OnDraw(ImGuiIO& io) {
|
|||
new_presenter_config.GetFsrSharpnessReduction();
|
||||
ImGui::TextUnformatted(
|
||||
"FSR sharpness reduction when upscaling (lower is sharper):");
|
||||
// Power 2.0 as the reduction is in stops, used in exp2.
|
||||
const auto label =
|
||||
fmt::format("{:.3f} stops", fsr_sharpness_reduction);
|
||||
// Power 2.0 scaling as the reduction is in stops, used in exp2.
|
||||
fsr_sharpness_reduction = sqrt(2.f * fsr_sharpness_reduction);
|
||||
ImGui::SliderFloat(
|
||||
"##FSRSharpnessReduction", &fsr_sharpness_reduction,
|
||||
ui::Presenter::GuestOutputPaintConfig::kFsrSharpnessReductionMin,
|
||||
ui::Presenter::GuestOutputPaintConfig::kFsrSharpnessReductionMax,
|
||||
"%.3f stops", 2.0f);
|
||||
label.c_str(), ImGuiSliderFlags_NoInput);
|
||||
fsr_sharpness_reduction =
|
||||
.5f * fsr_sharpness_reduction * fsr_sharpness_reduction;
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##ResetFSRSharpnessReduction")) {
|
||||
fsr_sharpness_reduction = ui::Presenter::GuestOutputPaintConfig ::
|
||||
|
|
Loading…
Reference in New Issue