screenshader: fix uniform variable checks (#2513)

This commit is contained in:
JManch 2023-06-14 12:03:20 +01:00 committed by GitHub
parent 7762ac0173
commit 9a88c19f1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -604,12 +604,12 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(const CTexture& tex, wlr_b
if ((usingFinalShader && g_pConfigManager->getInt("debug:damage_tracking") == 0) || CRASHING) {
glUniform1f(shader->time, m_tGlobalTimer.getSeconds());
} else if (usingFinalShader && shader->time > 0) {
} else if (usingFinalShader && shader->time != -1) {
// Don't let time be unitialised
glUniform1f(shader->time, 0.f);
}
if (usingFinalShader && shader->output > 0)
if (usingFinalShader && shader->output != -1)
glUniform1i(shader->output, m_RenderData.pMonitor->ID);
if (CRASHING) {