diff options
author | 2022-05-09 12:34:52 -0700 | |
---|---|---|
committer | 2022-05-09 12:34:52 -0700 | |
commit | 575fb073170e38103ba3f18663ab25dadad45353 (patch) | |
tree | 2a54ead1601c2935b6e456d3dcab455e58978b51 | |
parent | 0f24a7c37b3e65996c9bb88c3e22038ae2ca58ef (diff) |
Fix shader calculation equations that causes SDR grayscale mess-up.
Bug: 219698906
Test: play YouTube videos with Focus Mode on
Change-Id: Ic1d3ef72778da4e69d33c11dc11872356b856a41
-rw-r--r-- | libs/shaders/shaders.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/shaders/shaders.cpp b/libs/shaders/shaders.cpp index f0d45c2123..62745dc8d5 100644 --- a/libs/shaders/shaders.cpp +++ b/libs/shaders/shaders.cpp @@ -78,7 +78,7 @@ void generateEOTF(ui::Dataspace dataspace, std::string& shader) { shader.append(R"( float EOTF_sRGB(float srgb) { - return srgb <= 0.08125 ? srgb / 4.50 : pow((srgb + 0.099) / 1.099, 0.45); + return srgb <= 0.08125 ? srgb / 4.50 : pow((srgb + 0.099) / 1.099, 1 / 0.45); } float3 EOTF_sRGB(float3 srgb) { |