renderer: shader variants refactor (#13434)

Part 0 of renderer reworks.
This commit is contained in:
UjinT34 2026-03-07 00:05:10 +03:00 committed by GitHub
parent 8685fd7b0c
commit a5858018d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 1952 additions and 1472 deletions

View file

@ -162,8 +162,9 @@ void CScreenshareFrame::renderMonitor() {
if (!g_pHyprOpenGL->m_monitorRenderResources.contains(PMONITOR))
return; // wtf?
auto TEXTURE = g_pHyprOpenGL->m_monitorRenderResources[PMONITOR].monitorMirrorFB.getTexture();
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;
@ -173,7 +174,11 @@ 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->renderTexturePrimitive(TEXTURE, monbox);
g_pHyprOpenGL->renderTexture(TEXTURE, monbox,
{
.cmBackToSRGB = !IS_CM_AWARE,
.cmBackToSRGBSource = !IS_CM_AWARE ? PMONITOR : nullptr,
});
g_pHyprOpenGL->setRenderModifEnabled(true);
g_pHyprOpenGL->popMonitorTransformEnabled();