diff --git a/src/games/cp2077/addon.cpp b/src/games/cp2077/addon.cpp index d3f2aecb..e97fa589 100644 --- a/src/games/cp2077/addon.cpp +++ b/src/games/cp2077/addon.cpp @@ -109,7 +109,7 @@ renodx::utils::settings::Settings settings = { .key = "toneMapGammaCorrection", .binding = &shader_injection.toneMapGammaCorrection, .value_type = renodx::utils::settings::SettingValueType::INTEGER, - .default_value = 0.f, + .default_value = 2.f, .can_reset = false, .label = "Gamma Correction", .section = "Tone Mapping", @@ -131,7 +131,7 @@ renodx::utils::settings::Settings settings = { .key = "toneMapHueProcessor", .binding = &shader_injection.toneMapHueProcessor, .value_type = renodx::utils::settings::SettingValueType::INTEGER, - .default_value = 0.f, + .default_value = 1.f, .can_reset = false, .label = "Hue Processor", .section = "Tone Mapping", @@ -200,7 +200,7 @@ renodx::utils::settings::Settings settings = { .default_value = 50.f, .label = "Flare", .section = "Color Grading", - .tooltip = "Flare/Glare", + .tooltip = "Flare/Glare Compensation", .max = 100.f, .is_enabled = []() { return shader_injection.toneMapType == 3; }, .parse = [](float value) { return value * 0.02f; }, diff --git a/src/games/cp2077/colormath.hlsl b/src/games/cp2077/colormath.hlsl index 1d9a324b..a2733546 100644 --- a/src/games/cp2077/colormath.hlsl +++ b/src/games/cp2077/colormath.hlsl @@ -84,7 +84,7 @@ float3 convertColor(float3 inputColor, ConvertColorParams params) { default: // Unknown default case outputColor *= params.paperWhiteScaling; - outputColor += params.blackFloorAdjust; + // outputColor += params.blackFloorAdjust; } return outputColor.rgb; } diff --git a/src/games/cp2077/tonemapper.hlsl b/src/games/cp2077/tonemapper.hlsl index 92b4c221..bfc7b584 100644 --- a/src/games/cp2077/tonemapper.hlsl +++ b/src/games/cp2077/tonemapper.hlsl @@ -399,22 +399,14 @@ float4 tonemap(bool isACESMode = false) { outputRGB *= exposure; } - float3 correction_source; - bool skip_correction = false; if (injectedData.toneMapHueCorrection == 1.f) { - correction_source = renodx::tonemap::Reinhard(outputRGB); + outputRGB = renodx::color::correct::Hue(outputRGB, renodx::tonemap::Reinhard(outputRGB), 1.f, (uint)injectedData.toneMapHueProcessor); } else if (injectedData.toneMapHueCorrection == 2.f) { - correction_source = renodx::tonemap::ACESFittedBT709(outputRGB); + outputRGB = renodx::color::correct::Hue(outputRGB, renodx::tonemap::ACESFittedBT709(outputRGB), 1.f, (uint)injectedData.toneMapHueProcessor); } else if (injectedData.toneMapHueCorrection == 3.f) { - correction_source = renodx::tonemap::ACESFittedAP1(outputRGB); + outputRGB = renodx::color::correct::Hue(outputRGB, renodx::tonemap::ACESFittedAP1(outputRGB), 1.f, (uint)injectedData.toneMapHueProcessor); } else if (injectedData.toneMapHueCorrection == 4.f) { - correction_source = renodx::tonemap::uncharted2::BT709(outputRGB); - } else { - skip_correction = true; - } - - if (!skip_correction) { - outputRGB = renodx::color::correct::Hue(outputRGB, correction_source, 1.f, (uint)injectedData.toneMapHueProcessor); + outputRGB = renodx::color::correct::Hue(outputRGB, renodx::tonemap::uncharted2::BT709(outputRGB), 1.f, (uint)injectedData.toneMapHueProcessor); } if (toneMapperType == TONE_MAPPER_TYPE__VANILLA) { @@ -568,10 +560,10 @@ float4 tonemap(bool isACESMode = false) { config.mid_gray_nits = midGrayNits; config.reno_drt_highlights = 1.20f; config.reno_drt_shadows = 1.20f; - config.reno_drt_contrast = 1.20f; + config.reno_drt_contrast = 1.3f; config.reno_drt_saturation = 1.20f; config.reno_drt_dechroma = injectedData.colorGradeBlowout; - config.reno_drt_flare = 0.10f * pow(injectedData.colorGradeFlare, 10.f); + config.reno_drt_flare = 0.005 * injectedData.colorGradeFlare; config.reno_drt_hue_correction_method = (uint)injectedData.toneMapHueProcessor; outputRGB = renodx::tonemap::config::Apply(outputRGB, config);