diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index a6f48f64d..6bd04f307 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -3343,12 +3343,12 @@ void GL_DrawScreenFinalTexture(int tex, INT32 width, INT32 height, boolean usesh if (useshader) { - // godawful but you can only ever run ONE shader per renderpass and since i dont want to draw an extra screen texture when you downsample from higher resolution (essentially killing performance) + // godawful but you can only ever run ONE shader per renderpass and since i dont want to draw an extra screen texture when you downsample from higher resolution // so i combined the palette postprocess with this crap - if (HWR_ShouldUsePaletteRendering() && (!(HWR_UseShader() && fbo_shader && !WipeInAction))) - pglUseProgram(gl_shaders[SHADER_PALETTE_POSTPROCESS].program); // palette postprocess shader - else if (HWR_UseShader() && fbo_shader && !WipeInAction) // this looks awful with wipes + if (fbo_shader) pglUseProgram(gl_shaders[SHADER_DOWNSAMPLE].program); + else + pglUseProgram(gl_shaders[SHADER_PALETTE_POSTPROCESS].program); // palette postprocess shader } pglColor4ubv(white); @@ -3359,10 +3359,7 @@ void GL_DrawScreenFinalTexture(int tex, INT32 width, INT32 height, boolean usesh pglDrawArrays(GL_TRIANGLE_FAN, 0, 4); if (useshader) - { - if (HWR_ShouldUsePaletteRendering() || (HWR_UseShader() && fbo_shader && !WipeInAction)) - pglUseProgram(0); - } + pglUseProgram(0); tex_downloaded = screenTextures[tex]; } diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index 6159b6943..a244b8f59 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -282,18 +282,17 @@ void OglSdlFinishUpdate(boolean waitvbl) if (UseScreenFBO()) { GL_Framebuffer_Unbind(); - fbo_shader = true; // only need to run this here to not cause brightness + performance issues, its a bool since im a lazy ass + fbo_shader = HWR_UseShader() && !WipeInAction; // this looks awful with wipes } #endif //HWR_DrawScreenFinalTexture(sdlw, sdlh); - GL_DrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, sdlw, sdlh, true); + GL_DrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, sdlw, sdlh, (HWR_ShouldUsePaletteRendering() || fbo_shader)); #ifdef USE_FBO_OGL if (UseScreenFBO()) { GL_Framebuffer_Enable(); - fbo_shader = false; } #endif