only apply palrender postprocess shader once

This commit is contained in:
Alug committed 2024-11-27 22:34:48 +01:00
1 parent b8483376c4
commit dbdd5b8b6e
5 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ EXPORT void HWRAPI(FlushScreenTextures) (void);
EXPORT void HWRAPI(DoScreenWipe) (int wipeStart, int wipeEnd);
EXPORT void HWRAPI(DrawScreenTexture) (int tex, FSurfaceInfo *surf, FBITFIELD polyflags);
EXPORT void HWRAPI(MakeScreenTexture) (int tex);
EXPORT void HWRAPI(DrawScreenFinalTexture) (int tex, INT32 width, INT32 height);
EXPORT void HWRAPI(DrawScreenFinalTexture) (int tex, INT32 width, INT32 height, boolean useshader);
EXPORT void HWRAPI(RenderVhsEffect) (fixed_t upbary, fixed_t downbary, UINT8 updistort, UINT8 downdistort, UINT8 barsize);
+2 -2
View File
@@ -5626,9 +5626,9 @@ void HWR_MakeScreenFinalTexture(void)
HWD.pfnMakeScreenTexture(HWD_SCREENTEXTURE_GENERIC2);
}
void HWR_DrawScreenFinalTexture(INT32 width, INT32 height)
void HWR_DrawScreenFinalTexture(INT32 width, INT32 height, boolean useshader)
{
HWD.pfnDrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, width, height);
HWD.pfnDrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, width, height, useshader);
}
#endif // HWRENDER
+1 -1
View File
@@ -131,7 +131,7 @@ void HWR_DrawIntermissionBG(void);
void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum);
void HWR_RenderVhsEffect(fixed_t upbary, fixed_t downbary, UINT8 updistort, UINT8 downdistort, UINT8 barsize);
void HWR_MakeScreenFinalTexture(void);
void HWR_DrawScreenFinalTexture(INT32 width, INT32 height);
void HWR_DrawScreenFinalTexture(INT32 width, INT32 height, boolean useshader);
// hw_main.c: Segs
void HWR_ProcessSeg(void); // Sort of like GLWall::Process in GZDoom
+3 -3
View File
@@ -3396,7 +3396,7 @@ EXPORT void HWRAPI(MakeScreenTexture) (int tex)
tex_downloaded = screenTextures[tex];
}
EXPORT void HWRAPI(DrawScreenFinalTexture)(int tex, INT32 width, INT32 height)
EXPORT void HWRAPI(DrawScreenFinalTexture)(int tex, INT32 width, INT32 height, boolean useshader)
{
float xfix, yfix;
float origaspect, newaspect;
@@ -3463,7 +3463,7 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int tex, INT32 width, INT32 height)
pglBindTexture(GL_TEXTURE_2D, screenTextures[tex]);
if (HWR_ShouldUsePaletteRendering())
if (useshader)
pglUseProgram(gl_shaders[SHADER_PALETTE_POSTPROCESS].program); // palette postprocess shader
pglColor4ubv(white);
@@ -3473,7 +3473,7 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int tex, INT32 width, INT32 height)
pglDrawArrays(GL_TRIANGLE_FAN, 0, 4);
if (HWR_ShouldUsePaletteRendering())
if (useshader)
pglUseProgram(0);
tex_downloaded = screenTextures[tex];
+2 -2
View File
@@ -258,7 +258,7 @@ void OglSdlFinishUpdate(boolean waitvbl)
GLFramebuffer_Unbind();
#endif
HWR_DrawScreenFinalTexture(sdlw, sdlh);
HWR_DrawScreenFinalTexture(sdlw, sdlh, HWR_ShouldUsePaletteRendering());
#ifdef USE_FBO_OGL
if (UseScreenFBO())
@@ -276,7 +276,7 @@ void OglSdlFinishUpdate(boolean waitvbl)
&& (!UseScreenFBO())
#endif
)
HWR_DrawScreenFinalTexture(realwidth, realheight);
HWR_DrawScreenFinalTexture(realwidth, realheight, false);
}
EXPORT void HWRAPI(OglSdlSetPalette) (RGBA_t *palette)