From 1ed4f1cb254ce4b4e55727d972998be1ef4baf22 Mon Sep 17 00:00:00 2001 From: JManch <61563764+JManch@users.noreply.github.com> Date: Sun, 4 Feb 2024 02:30:00 +0000 Subject: [PATCH] screenshader: rename output uniform to wl_output (#4606) * screenshader: rename output uniform to monitor * rename to wl_output --- src/render/OpenGL.cpp | 12 ++++++------ src/render/Shader.hpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 889a23bb..e9df3b05 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -526,10 +526,10 @@ void CHyprOpenGLImpl::applyScreenShader(const std::string& path) { return; } - m_sFinalScreenShader.proj = glGetUniformLocation(m_sFinalScreenShader.program, "proj"); - m_sFinalScreenShader.tex = glGetUniformLocation(m_sFinalScreenShader.program, "tex"); - m_sFinalScreenShader.time = glGetUniformLocation(m_sFinalScreenShader.program, "time"); - m_sFinalScreenShader.output = glGetUniformLocation(m_sFinalScreenShader.program, "output"); + m_sFinalScreenShader.proj = glGetUniformLocation(m_sFinalScreenShader.program, "proj"); + m_sFinalScreenShader.tex = glGetUniformLocation(m_sFinalScreenShader.program, "tex"); + m_sFinalScreenShader.time = glGetUniformLocation(m_sFinalScreenShader.program, "time"); + m_sFinalScreenShader.wl_output = glGetUniformLocation(m_sFinalScreenShader.program, "wl_output"); if (m_sFinalScreenShader.time != -1 && g_pConfigManager->getInt("debug:damage_tracking") != 0 && !g_pHyprRenderer->m_bCrashingInProgress) { // The screen shader uses the "time" uniform // Since the screen shader could change every frame, damage tracking *needs* to be disabled @@ -821,8 +821,8 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(const CTexture& tex, CBox* glUniform1f(shader->time, 0.f); } - if (usingFinalShader && shader->output != -1) - glUniform1i(shader->output, m_RenderData.pMonitor->ID); + if (usingFinalShader && shader->wl_output != -1) + glUniform1i(shader->wl_output, m_RenderData.pMonitor->ID); if (CRASHING) { glUniform1f(shader->distort, g_pHyprRenderer->m_fCrashingDistort); diff --git a/src/render/Shader.hpp b/src/render/Shader.hpp index 70fe468c..185c3dff 100644 --- a/src/render/Shader.hpp +++ b/src/render/Shader.hpp @@ -42,9 +42,9 @@ class CShader { GLint gradientLength = -1; GLint angle = -1; - GLint time = -1; - GLint distort = -1; - GLint output = -1; + GLint time = -1; + GLint distort = -1; + GLint wl_output = -1; // Blur prepare GLint contrast = -1;