From 08e5b4844e00590e5718ef4770c02ce821baeca3 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 15 Jan 2024 13:59:43 +0100 Subject: [PATCH] fix palshader --- src/hardware/r_opengl/r_opengl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 681c42005..5a3ea3360 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2397,6 +2397,13 @@ static void PreparePolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FBITFIELD fade.green = byte2float[pSurf->FadeColor.s.green]; fade.blue = byte2float[pSurf->FadeColor.s.blue]; fade.alpha = byte2float[pSurf->FadeColor.s.alpha]; + + if (HWR_ShouldUsePaletteRendering && gl_allowshaders) + { + pglActiveTexture(GL_TEXTURE2); + pglBindTexture(GL_TEXTURE_2D, pSurf->LightTableId); + pglActiveTexture(GL_TEXTURE0); + } } Shader_Load(pSurf, &poly, &tint, &fade);