Skip to content

Commit

Permalink
screenshader: rename output uniform to wl_output (#4606)
Browse files Browse the repository at this point in the history
* screenshader: rename output uniform to monitor

* rename to wl_output
  • Loading branch information
JManch authored Feb 4, 2024
1 parent 5d4ff60 commit 1ed4f1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/render/OpenGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/render/Shader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1ed4f1c

Please sign in to comment.