mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 23:42:43 +00:00
Fixed suggestions and clang.
This commit is contained in:
parent
652de1db51
commit
c8b71918ce
@ -1,6 +1,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/config.h"
|
||||
#include "layer.h"
|
||||
|
||||
#include <imgui.h>
|
||||
@ -94,7 +95,10 @@ void L::DrawMenuBar() {
|
||||
Checkbox("RCAS", &fsr.use_rcas);
|
||||
BeginDisabled(!fsr.use_rcas);
|
||||
{
|
||||
SliderFloat("RCAS Attenuation", &fsr.rcas_attenuation, 0.0, 3.0);
|
||||
float attenuation = Config::getRcasAttenuation();
|
||||
if (SliderFloat("RCAS Attenuation", &attenuation, 0.0, 3.0)) {
|
||||
Config::setRcasAttenuation(attenuation);
|
||||
}
|
||||
}
|
||||
EndDisabled();
|
||||
}
|
||||
@ -309,6 +313,10 @@ static void LoadSettings(const char* line) {
|
||||
dump_frame_count = i;
|
||||
return;
|
||||
}
|
||||
if (sscanf(line, "rcas_attenuation=%f", &f) == 1) {
|
||||
Config::setRcasAttenuation(f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void L::SetupSettings() {
|
||||
@ -418,4 +426,4 @@ void L::Draw() {
|
||||
}
|
||||
|
||||
PopID();
|
||||
}
|
||||
}
|
@ -273,7 +273,7 @@ vk::ImageView FsrPass::Render(vk::CommandBuffer cmdbuf, vk::ImageView input,
|
||||
|
||||
{ // rcas
|
||||
consts = {};
|
||||
FsrRcasCon(reinterpret_cast<AU1*>(&consts.Const0), Config::getRcasAttenuation());
|
||||
FsrRcasCon(reinterpret_cast<AU1*>(&consts.Const0), settings.rcas_attenuation);
|
||||
consts.Sample[0] = hdr ? 1 : 0;
|
||||
|
||||
std::array<vk::DescriptorImageInfo, 3> img_info{{
|
||||
|
@ -15,7 +15,7 @@ public:
|
||||
struct Settings {
|
||||
bool enable{true};
|
||||
bool use_rcas{true};
|
||||
float rcas_attenuation{Config::getRcasAttenuation()};
|
||||
float rcas_attenuation{0.25f};
|
||||
};
|
||||
|
||||
void Create(vk::Device device, VmaAllocator allocator, u32 num_images);
|
||||
|
Loading…
Reference in New Issue
Block a user