Skip to content

Commit

Permalink
fix(unrealengine): always hue correction with by luminance
Browse files Browse the repository at this point in the history
  • Loading branch information
clshortfuse committed Jan 5, 2025
1 parent f85eb3c commit 56d09d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/games/unrealengine/common.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ float3 UpgradeToneMapByLuminance(float3 color_hdr, float3 color_sdr, float3 post

float3 color_scaled = max(0, bt2020_post_process * ratio);
color_scaled = renodx::color::bt709::from::BT2020(color_scaled);
float peak_correction = saturate(1.f - renodx::color::y::from::BT2020(bt2020_post_process));
color_scaled = renodx::color::correct::Hue(color_scaled, post_process_color, peak_correction);
color_scaled = renodx::color::correct::Hue(color_scaled, post_process_color);
return lerp(color_hdr, color_scaled, post_process_strength);
}

Expand Down

0 comments on commit 56d09d2

Please sign in to comment.