From 272ea092c2bcbc5ef48854af39d54feb01c969ae Mon Sep 17 00:00:00 2001
From: Jaswant Panchumarti <jaswant.panchumarti@kitware.com>
Date: Fri, 22 Sep 2023 09:48:19 -0400
Subject: [PATCH] OpenGL: Remove unused shader variable for gradient background

- screeSize is not used
---
 Rendering/OpenGL2/vtkOpenGLRenderer.cxx | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Rendering/OpenGL2/vtkOpenGLRenderer.cxx b/Rendering/OpenGL2/vtkOpenGLRenderer.cxx
index d6f1168bbba..f1c5745003c 100644
--- a/Rendering/OpenGL2/vtkOpenGLRenderer.cxx
+++ b/Rendering/OpenGL2/vtkOpenGLRenderer.cxx
@@ -669,7 +669,6 @@ void vtkOpenGLRenderer::Clear()
     {
       vtkShaderProgram::Substitute(fs, "//VTK::FSQ::Decl",
         "uniform vec3 stopColors[2];\n"
-        "uniform vec2 screenSize;\n"
         "//VTK::FSQ::Decl");
       switch (this->GradientMode)
       {
@@ -733,11 +732,7 @@ void vtkOpenGLRenderer::Clear()
 
       std::copy(this->Background, this->Background + 3, &stopColors[0][0]);
       std::copy(this->Background2, this->Background2 + 3, &stopColors[1][0]);
-      int vp[4]; // llX, llY, width, height
-      this->GetTiledSizeAndOrigin(&vp[2], &vp[3], &vp[0], &vp[1]);
-      float screenSize[2] = { static_cast<float>(vp[3]), static_cast<float>(vp[4]) };
       this->BackgroundRenderer->Program->SetUniform3fv("stopColors", 2, stopColors);
-      this->BackgroundRenderer->Program->SetUniform1fv("screenSize", 2, screenSize);
     }
     // draw the background.
     this->BackgroundRenderer->Render();
-- 
GitLab