mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 15:50:05 +01:00
cm: follow preferred srgb eotf for screencopy (#12230)
This commit is contained in:
parent
1ca6058bda
commit
3fc8cb828c
1 changed files with 3 additions and 1 deletions
|
|
@ -1711,7 +1711,9 @@ void CHyprOpenGLImpl::renderTextureInternal(SP<CTexture> tex, const CBox& box, c
|
||||||
// revert luma changes to avoid black screenshots.
|
// 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.
|
// this will likely not be 1:1, and might cause screenshots to be too bright, but it's better than pitch black.
|
||||||
imageDescription.luminances = {};
|
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
|
} else
|
||||||
passCMUniforms(*shader, imageDescription);
|
passCMUniforms(*shader, imageDescription);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue