render/cm: add ICC profile pipeline (#12711)
Adds an ICC profile pipeline, loading via config and applying via 3D LUTs.
This commit is contained in:
parent
8271cfc97b
commit
10754745a9
27 changed files with 984 additions and 373 deletions
|
|
@ -159,9 +159,11 @@ void CScreenshareFrame::renderMonitor() {
|
|||
|
||||
const auto PMONITOR = m_session->monitor();
|
||||
|
||||
auto TEXTURE = makeShared<CTexture>(PMONITOR->m_output->state->state().buffer);
|
||||
if (!g_pHyprOpenGL->m_monitorRenderResources.contains(PMONITOR))
|
||||
return; // wtf?
|
||||
|
||||
auto TEXTURE = g_pHyprOpenGL->m_monitorRenderResources[PMONITOR].monitorMirrorFB.getTexture();
|
||||
|
||||
const bool IS_CM_AWARE = PROTO::colorManagement && PROTO::colorManagement->isClientCMAware(m_session->m_client);
|
||||
g_pHyprOpenGL->m_renderData.transformDamage = false;
|
||||
g_pHyprOpenGL->m_renderData.noSimplify = true;
|
||||
|
||||
|
|
@ -171,11 +173,7 @@ void CScreenshareFrame::renderMonitor() {
|
|||
.translate(-m_session->m_captureBox.pos()); // vvvv kinda ass-backwards but that's how I designed the renderer... sigh.
|
||||
g_pHyprOpenGL->pushMonitorTransformEnabled(true);
|
||||
g_pHyprOpenGL->setRenderModifEnabled(false);
|
||||
g_pHyprOpenGL->renderTexture(TEXTURE, monbox,
|
||||
{
|
||||
.cmBackToSRGB = !IS_CM_AWARE,
|
||||
.cmBackToSRGBSource = !IS_CM_AWARE ? PMONITOR : nullptr,
|
||||
});
|
||||
g_pHyprOpenGL->renderTexturePrimitive(TEXTURE, monbox);
|
||||
g_pHyprOpenGL->setRenderModifEnabled(true);
|
||||
g_pHyprOpenGL->popMonitorTransformEnabled();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue