diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 4e02f03df..1565fa526 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -152,7 +152,6 @@ static CV_PossibleValue_t glpalettedepth_cons_t[] = {{16, "16 bits"}, {24, "24 b consvar_t cv_grpalettedepth = {"gr_palettedepth", "16 bits", CV_SAVE|CV_CALL, glpalettedepth_cons_t, CV_grpalettedepth_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grflashpal = {"gr_flashpal", "On", CV_CALL|CV_SAVE, CV_OnOff, CV_grshaders_OnChange, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_groldpal = {"gr_oldpal", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grmdls = {"gr_mdls", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grfallbackplayermodel = {"gr_fallbackplayermodel", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -6422,7 +6421,6 @@ void HWR_AddCommands(void) CV_RegisterVar(&cv_grpaletterendering); CV_RegisterVar(&cv_grpalettedepth); CV_RegisterVar(&cv_grflashpal); - CV_RegisterVar(&cv_groldpal); } // -------------------------------------------------------------------------- @@ -6663,13 +6661,13 @@ void HWR_RenderVhsEffect(fixed_t upbary, fixed_t downbary, UINT8 updistort, UINT void HWR_MakeScreenFinalTexture(void) { - int tex = ((HWR_ShouldUsePaletteRendering() && !cv_groldpal.value) ? HWD_SCREENTEXTURE_GENERIC3 : HWD_SCREENTEXTURE_GENERIC2); + int tex = (HWR_ShouldUsePaletteRendering() ? HWD_SCREENTEXTURE_GENERIC3 : HWD_SCREENTEXTURE_GENERIC2); HWD.pfnMakeScreenTexture(tex); } void HWR_DrawScreenFinalTexture(int width, int height) { - int tex = ((HWR_ShouldUsePaletteRendering() && !cv_groldpal.value) ? HWD_SCREENTEXTURE_GENERIC3 : HWD_SCREENTEXTURE_GENERIC2); + int tex = (HWR_ShouldUsePaletteRendering() ? HWD_SCREENTEXTURE_GENERIC3 : HWD_SCREENTEXTURE_GENERIC2); HWD.pfnDrawScreenFinalTexture(tex, width, height); } diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index d07855a12..2d19ec1c4 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -192,7 +192,6 @@ extern consvar_t cv_grrenderdistance; extern consvar_t cv_grusecustomshaders; extern consvar_t cv_grpaletterendering; extern consvar_t cv_grpalettedepth; -extern consvar_t cv_groldpal; extern consvar_t cv_grflashpal; extern consvar_t cv_grscreentextures; extern consvar_t cv_grportals; diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 3eb01bced..0a6917957 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -3332,17 +3332,13 @@ EXPORT void HWRAPI(DrawScreenTexture)(int tex) pglBindTexture(GL_TEXTURE_2D, screenTextures[tex]); - if (((HWR_ShouldUsePaletteRendering()) && (tex == HWD_SCREENTEXTURE_GENERIC2)) && !cv_groldpal.value) - pglUseProgram(gl_shaderprograms[8].program); // palette postprocess shader + Shader_SetUniforms(NULL, NULL, NULL, NULL); // prepare shader, if it is enabled pglColor4ubv(white); pglTexCoordPointer(2, GL_FLOAT, 0, fix); pglVertexPointer(3, GL_FLOAT, 0, screenVerts); pglDrawArrays(GL_TRIANGLE_FAN, 0, 4); - - if (((HWR_ShouldUsePaletteRendering()) && (tex == HWD_SCREENTEXTURE_GENERIC2)) && !cv_groldpal.value) - pglUseProgram(0); tex_downloaded = screenTextures[tex]; } @@ -3637,8 +3633,8 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int tex, int width, int height) pglBindTexture(GL_TEXTURE_2D, screenTextures[tex]); - if ((HWR_ShouldUsePaletteRendering()) && cv_groldpal.value) - pglUseProgram(gl_shaderprograms[8].program); // palette postprocess shader + //if ((HWR_ShouldUsePaletteRendering()) && cv_groldpal.value) + //pglUseProgram(gl_shaderprograms[8].program); // palette postprocess shader pglColor4ubv(white); @@ -3647,8 +3643,8 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int tex, int width, int height) pglDrawArrays(GL_TRIANGLE_FAN, 0, 4); - if ((HWR_ShouldUsePaletteRendering()) && cv_groldpal.value) - pglUseProgram(0); + //if ((HWR_ShouldUsePaletteRendering()) && cv_groldpal.value) + //pglUseProgram(0); tex_downloaded = screenTextures[tex]; } diff --git a/src/m_menu.c b/src/m_menu.c index fc68875b7..bd7d2f8ac 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1494,8 +1494,7 @@ static menuitem_t OP_ExpOptionsMenu[] = #ifdef HWRENDER {IT_STRING | IT_CVAR, NULL, "Screen Textures", &cv_grscreentextures, 75}, - {IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_grpalettedepth, 75}, - {IT_STRING | IT_CVAR, NULL, "Old Palshader", &cv_groldpal, 85}, + {IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_grpalettedepth, 85}, {IT_STRING | IT_CVAR, NULL, "Splitwall/Slope texture fix", &cv_splitwallfix, 105}, {IT_STRING | IT_CVAR, NULL, "Slope midtexture peg fix", &cv_slopepegfix, 115}, @@ -1515,7 +1514,7 @@ static const char* OP_ExpTooltips[] = #ifdef HWRENDER "Should the game do Screen Textures? Provides a good boost to frames\nat the cost of some visual effects not working when disabled.", "Fixes issues that resulted in Textures sticking from the\nground sometimes.\nThis may be CPU heavy and result in worse performance in some cases.", - "Changes back to old Palette renderer screentexture behaviour\nthis makes performance better and keeps the old visuals\nat the cost of accuracy.", + "Change the depth of the palette in palette rendering mode.", "Fixes issues that resulted in Textures sticking from the ground sometimes.\n This may be CPU heavy and result in worse performance in some cases.", "Fixes issues that resulted in Textures not being properly skewed\n example: Fences on slopes that didnt show proper.\n This may be CPU heavy and result in worse performance in some cases.", "Fixes issues that resulted in Textures on Floor over Floors\nZFighting heavily.", diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 9aa2ed49d..fadce02f7 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1484,12 +1484,15 @@ void I_FinishUpdate(void) else if (rendermode == render_opengl) { // Final postprocess step of palette rendering, after everything else has been drawn. - if (HWR_ShouldUsePaletteRendering() && !cv_groldpal.value) + if (HWR_ShouldUsePaletteRendering()) { HWD.pfnMakeScreenTexture(HWD_SCREENTEXTURE_GENERIC2); + HWD.pfnSetSpecialState(HWD_SET_SHADERS, 1); + HWD.pfnSetShader(8); HWD.pfnDrawScreenTexture(HWD_SCREENTEXTURE_GENERIC2); + HWD.pfnUnSetShader(); + HWD.pfnSetSpecialState(HWD_SET_SHADERS, 0); } - OglSdlFinishUpdate(cv_vidwait.value); } #endif