Add shader stage for final screen texture draw
This commit is contained in:
parent
494eb9b5bd
commit
54a59937af
4 changed files with 7 additions and 0 deletions
|
|
@ -166,6 +166,7 @@ enum
|
|||
SHADER_SKY,
|
||||
SHADER_PALETTE_POSTPROCESS,
|
||||
SHADER_UI_COLORMAP_FADE,
|
||||
SHADER_FINAL_POST_PROCESS,
|
||||
|
||||
NUMSHADERTARGETS
|
||||
};
|
||||
|
|
|
|||
|
|
@ -435,6 +435,8 @@ customshaderxlat_t shaderxlat[] =
|
|||
{"Sky", SHADER_SKY},
|
||||
{"PalettePostprocess", SHADER_PALETTE_POSTPROCESS},
|
||||
{"UIColormapFade", SHADER_UI_COLORMAP_FADE},
|
||||
{"FinalPostProcess", SHADER_FINAL_POST_PROCESS},
|
||||
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3449,6 +3449,8 @@ void GL_DrawScreenFinalTexture(int tex, int width, int height)
|
|||
GL_ClearBuffer(true, false, false, &clearColour);
|
||||
pglBindTexture(GL_TEXTURE_2D, screenTextures[tex]);
|
||||
|
||||
Shader_SetUniforms(NULL, NULL, NULL, NULL); // prepare shader, if it is enabled
|
||||
|
||||
pglColor4ubv(white);
|
||||
|
||||
pglTexCoordPointer(2, GL_FLOAT, 0, fix);
|
||||
|
|
|
|||
|
|
@ -185,7 +185,9 @@ void OglSdlFinishUpdate(boolean waitvbl)
|
|||
SDL_GetWindowSizeInPixels(window, &sdlw, &sdlh);
|
||||
|
||||
HWR_MakeScreenFinalTexture();
|
||||
GL_SetShader(HWR_GetShaderFromTarget(SHADER_FINAL_POST_PROCESS));
|
||||
HWR_DrawScreenFinalTexture(sdlw, sdlh);
|
||||
GL_UnSetShader();
|
||||
SDL_GL_SwapWindow(window);
|
||||
|
||||
GL_GClipRect(0, 0, vid.width, vid.height, NZCLIP_PLANE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue