Skip to content

Commit

Permalink
fix(unrealengine): activate hue correction options in shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
clshortfuse committed Dec 30, 2024
1 parent e63927e commit 55d6ece
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/games/unrealengine/common.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,20 @@ float3 ToneMap(float3 bt709) {

config.reno_drt_hue_correction_method = (uint)injectedData.toneMapHueProcessor;

config.hue_correction_type =
renodx::tonemap::config::hue_correction_type::CUSTOM;
config.hue_correction_strength = injectedData.toneMapHueCorrection;
config.hue_correction_color = bt709;
if (injectedData.toneMapHueCorrectionMethod == 1.f) {
config.hue_correction_color = saturate(bt709);
} else if (injectedData.toneMapHueCorrectionMethod == 2.f) {
config.hue_correction_color = renodx::tonemap::uncharted2::BT709(bt709);
} else if (injectedData.toneMapHueCorrectionMethod == 3.f) {
config.hue_correction_color = RenoDRTSmoothClamp(bt709);
} else {
config.hue_correction_type =
renodx::tonemap::config::hue_correction_type::INPUT;
}

float3 output_color = renodx::tonemap::config::Apply(bt709, config);

Expand Down

0 comments on commit 55d6ece

Please sign in to comment.