Comfort vignette fix

This commit is contained in:
Petr Bartos 2024-11-12 21:20:42 +01:00
parent 2ef52a8e6a
commit be3d73cc6b
2 changed files with 10 additions and 0 deletions

View file

@ -4180,6 +4180,9 @@ static void CG_DrawVignette( bool force )
vec4_t black = {0.0, 0.0, 0.0, 1};
cgi_R_SetColor( black );
int drawingHUDOrid = cg.drawingHUD;
cg.drawingHUD = CG_HUD_ZOOM;
// sides
cgi_R_DrawStretchPic( 0, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
cgi_R_DrawStretchPic( screenWidth - x, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
@ -4189,6 +4192,8 @@ static void CG_DrawVignette( bool force )
// vignette
cgi_R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, cgs.media.vignetteShader );
cg.drawingHUD = drawingHUDOrid;
cgi_R_SetColor( NULL );
}
}

View file

@ -2663,6 +2663,9 @@ static void CG_DrawVignette( void )
vec4_t black = {0.0, 0.0, 0.0, 1};
cgi_R_SetColor( black );
int drawingHUDOrid = cg.drawingHUD;
cg.drawingHUD = CG_HUD_ZOOM;
// sides
cgi_R_DrawStretchPic( 0, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
cgi_R_DrawStretchPic( screenWidth - x, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
@ -2672,6 +2675,8 @@ static void CG_DrawVignette( void )
// vignette
cgi_R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, cgs.media.vignetteShader );
cg.drawingHUD = drawingHUDOrid;
cgi_R_SetColor( NULL );
}
}