Skip to content

Commit

Permalink
Revert "[YS10] Fix saturation"
Browse files Browse the repository at this point in the history
This reverts commit 11ba44f.
  • Loading branch information
marat569 committed Oct 26, 2024
1 parent 11ba44f commit cff3f62
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/games/ys10/tonemapper.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ float3 applyUserTonemap(float3 untonemapped) {
float renoDRTSaturation = 1.f; //
float renoDRTHighlights = 1.f;

if (injectedData.toneMapType != 0) { // UserColorGrading, pre-tonemap
if (injectedData.toneMapType != 0) { // UserColorGrading, for our sliders
outputColor.rgb = renodx::color::grade::UserColorGrading(
outputColor.rgb,
injectedData.colorGradeExposure, // exposure
injectedData.colorGradeHighlights, // highlights
injectedData.colorGradeShadows, // shadows
injectedData.colorGradeContrast, // contrast
1.f, // saturation, we'll do this post-tonemap
injectedData.colorGradeSaturation, // saturation
0.f, // dechroma, we don't need it
0.f); // hue correction, might not need it [yet]
}
Expand All @@ -60,23 +60,10 @@ float3 applyUserTonemap(float3 untonemapped) {
} else if (injectedData.toneMapType == 3.f) { // baby reinhard
float ReinhardPeak = injectedData.toneMapPeakNits / injectedData.toneMapGameNits;
outputColor.rgb = fast_reinhard(outputColor.rgb, ReinhardPeak);

} else if (injectedData.toneMapType == 4.f) { // Frostbite
float frostbitePeak = injectedData.toneMapPeakNits / injectedData.toneMapGameNits;
outputColor = renodx::tonemap::frostbite::BT709(outputColor, frostbitePeak);
}

if (injectedData.toneMapType != 0) { // UserColorGrading, post-tonemap
outputColor.rgb = renodx::color::grade::UserColorGrading(
outputColor.rgb,
1.f, // exposure
1.f, // highlights
1.f, // shadows
1.f, // contrast
injectedData.colorGradeSaturation, // saturation
0.f, // dechroma, we don't need it
0.f); // hue correction, might not need it [yet]
}

return outputColor;
}

0 comments on commit cff3f62

Please sign in to comment.