From 71e7dacb569354035734aa5e631fae90d968d3ff Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 4 Dec 2025 01:26:23 +0100 Subject: [PATCH] r_opengl: dont set directional light model shader uniforms if we dont use them --- src/hardware/r_opengl/r_opengl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 491b903b0..94656e843 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2209,16 +2209,10 @@ static void GL_Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRG UNIFORM_1(shader->uniforms[gluniform_light_contrast], shader_light_contrast, pglUniform1f); UNIFORM_1(shader->uniforms[gluniform_light_backlight], shader_light_backlight, pglUniform1f); } - else - { - UNIFORM_3(shader->uniforms[gluniform_light_dir], 0, 0, 0, pglUniform3f); - UNIFORM_1(shader->uniforms[gluniform_light_contrast], 0, pglUniform1f); - UNIFORM_1(shader->uniforms[gluniform_light_backlight], 0, pglUniform1f); - } UNIFORM_1(shader->uniforms[gluniform_leveltime], shader_leveltime, pglUniform1f); - UNIFORM_2(shader->uniforms[gluniform_scr_resolution], vid.width, vid.height, pglUniform2f); + UNIFORM_2(shader->uniforms[gluniform_scr_resolution], (GLfloat)vid.width, (GLfloat)vid.height, pglUniform2f); #undef UNIFORM_1 #undef UNIFORM_2