summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 02da142f..baf69b96 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -1711,7 +1711,9 @@ void CHyprOpenGLImpl::renderTextureInternal(SP<CTexture> tex, const CBox& box, c
// revert luma changes to avoid black screenshots.
// this will likely not be 1:1, and might cause screenshots to be too bright, but it's better than pitch black.
imageDescription.luminances = {};
- passCMUniforms(*shader, imageDescription, NColorManagement::SImageDescription{}, true, -1, -1);
+ static auto PSDREOTF = CConfigValue<Hyprlang::INT>("render:cm_sdr_eotf");
+ auto chosenSdrEotf = *PSDREOTF > 0 ? NColorManagement::CM_TRANSFER_FUNCTION_GAMMA22 : NColorManagement::CM_TRANSFER_FUNCTION_SRGB;
+ passCMUniforms(*shader, imageDescription, NColorManagement::SImageDescription{.transferFunction = chosenSdrEotf}, true, -1, -1);
} else
passCMUniforms(*shader, imageDescription);
}