Make software overbright optional (cvar r_softOverbright) and reduce the number of FBOs and FBO blits when able.
This commit is contained in:
parent
1f8db4c14a
commit
467619c034
8 changed files with 166 additions and 201 deletions
|
@ -2943,6 +2943,7 @@ void R_CreateBuiltinImages( void ) {
|
|||
tr.godRaysImage = R_CreateImage("*godRays", NULL, width, height, IMGTYPE_COLORALPHA, IMGFLAG_NO_COMPRESSION | IMGFLAG_CLAMPTOEDGE, GL_RGBA8);
|
||||
#endif
|
||||
|
||||
if (r_softOverbright->integer)
|
||||
{
|
||||
int format;
|
||||
|
||||
|
@ -3033,14 +3034,14 @@ void R_SetColorMappings( void ) {
|
|||
tr.overbrightBits = 0; // need hardware gamma for overbright
|
||||
}
|
||||
|
||||
// never overbright in windowed mode
|
||||
if ( 0 /* !glConfig.isFullscreen */ )
|
||||
// never overbright in windowed mode without soft overbright
|
||||
if ( !glConfig.isFullscreen && !r_softOverbright->integer )
|
||||
{
|
||||
tr.overbrightBits = 0;
|
||||
}
|
||||
|
||||
// never overbright with tonemapping
|
||||
if ( r_toneMap->integer )
|
||||
if ( r_toneMap->integer && r_hdr->integer )
|
||||
{
|
||||
tr.overbrightBits = 0;
|
||||
}
|
||||
|
@ -3077,8 +3078,11 @@ void R_SetColorMappings( void ) {
|
|||
|
||||
shift = tr.overbrightBits;
|
||||
|
||||
if (glRefConfig.framebufferObject)
|
||||
// no shift with soft overbright
|
||||
if (r_softOverbright->integer)
|
||||
{
|
||||
shift = 0;
|
||||
}
|
||||
|
||||
for ( i = 0; i < 256; i++ ) {
|
||||
if ( g == 1 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue