Restore behavioral render preset override coverage

This commit is contained in:
woutermans committed 2026-10-12 12:47:53 +02:00
1 parent bd343a7be1
commit 56e1b76622
4 files changed
+117 -7

No files matched your search

+6 -5
View File
@@ -74,6 +74,7 @@
#include <vector>
#include "d4r_event_wait.h"
#include "d4r_frame_completion.h"
#include "d4r_render_presets.h"
#include "d4r_win32_wait.h"
#include "d4r_vkd3d_interop.h"
#include "../engine/game.h"
@@ -7109,18 +7110,18 @@ static NgxResult create_feature(unsigned int featureId, void* parameters, NgxHan
unsigned int presets[6];
for (int index = 0; index < 6; ++index)
presets[index] = get_uint_or(parameters, presetNames[index], 0);
const std::string forced = env_string(rayReconstruction ? "D4R_RR_PRESET" : "D4R_DLSS_PRESET");
if (!forced.empty())
const std::string forced = env_string(d4r_render_preset_variable(rayReconstruction));
const auto presetOverride = d4r_parse_render_preset_override(forced.c_str());
if (presetOverride.enabled)
{
const unsigned int value = static_cast<unsigned int>(strtoul(forced.c_str(), nullptr, 0));
const unsigned int value = presetOverride.value;
const char* model = value == 5 ? "E" : value == 11 ? "K" : value == 12 ? "L" : value == 13 ? "M" : "custom";
logf("DLSS model override: D4R_DLSS_PRESET=%s (model %s) overrides game/OptiScaler presets "
"[DLAA=%u Quality=%u Balanced=%u Performance=%u UltraPerformance=%u UltraQuality=%u]; "
"using preset=%u for all quality modes",
forced.c_str(), model, presets[0], presets[1], presets[2], presets[3], presets[4], presets[5], value);
for (unsigned int& preset : presets)
preset = value;
}
presetOverride.apply(presets);
feature->preset = presets[1];
// Direct output needs the native output kernel of the preset in use (verified: K = 11 through
// hiluma_engine_output, M = 13 through rrlite_downsample_kernel, its last kernel). Only a forced