From cd3ed5a92703664abfa0afcd1ac1f762dcfa7a4a Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Thu, 15 May 2014 23:46:53 +0200 Subject: [PATCH] Sacrificed texture bias option for shadows option. fixes #109 We can't add new graphics options without altering the original Flash menu files which we don't have. I disabled the r_lodBias functionality which can make the game look worse by adding a bias to the texture lookup functions which cause choosing texture mip maps that are smaller than the original image size in every view even though we want the first mip map level 0 which is the best quality. --- README.txt | 14 ++++++++------ neo/d3xp/menus/MenuScreen.h | 2 +- .../menus/MenuScreen_Shell_SystemOptions.cpp | 16 ++++++++-------- neo/renderer/OpenGL/gl_Image.cpp | 7 ++++++- neo/renderer/RenderSystem_init.cpp | 4 +++- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/README.txt b/README.txt index 88a12a76..8730a0a1 100644 --- a/README.txt +++ b/README.txt @@ -130,19 +130,21 @@ If you don't want to use git, you can download the source as a zip file at ___________________________________________________________________ -5) COMPILING ON WIN32 WITH VISUAL C++ 2010 EXPRESS EDITION +5) COMPILING ON WIN32 WITH VISUAL C++ 2013 EXPRESS EDITION __________________________________________________________ -1. Download and install the Visual C++ 2010 Express Edition. +1. Download and install the Visual C++ 2013 Express Edition. -2. Generate the VC10 projects using CMake by doubleclicking a matching configuration .bat file in the neo/ folder. +2. Download and install the latest CMake. -3. Use the VC10 solution to compile what you need: +3. Generate the VC13 projects using CMake by doubleclicking a matching configuration .bat file in the neo/ folder. + +4. Use the VC13 solution to compile what you need: RBDOOM-3-BFG/build/RBDoom3BFG.sln -4. Download ffmpeg-20140405-git-ec8789a-win32-shared.7z from ffmpeg.zeranoe.com/builds/win32/devel +5. Download ffmpeg-20140405-git-ec8789a-win32-shared.7z from ffmpeg.zeranoe.com/builds/win32/shared -5. Extract the DLLs to your current build directory under RBDOOM-3-BFG/build/ +6. Extract the FFmpeg DLLs to your current build directory under RBDOOM-3-BFG/build/ __________________________________ diff --git a/neo/d3xp/menus/MenuScreen.h b/neo/d3xp/menus/MenuScreen.h index dbeae1cd..35e1ad27 100644 --- a/neo/d3xp/menus/MenuScreen.h +++ b/neo/d3xp/menus/MenuScreen.h @@ -1364,8 +1364,8 @@ public: SYSTEM_FIELD_MOTIONBLUR, // RB begin SYSTEM_FIELD_SHADOWMAPPING, + //SYSTEM_FIELD_LODBIAS, // RB end - SYSTEM_FIELD_LODBIAS, SYSTEM_FIELD_BRIGHTNESS, SYSTEM_FIELD_VOLUME, MAX_SYSTEM_FIELDS diff --git a/neo/d3xp/menus/MenuScreen_Shell_SystemOptions.cpp b/neo/d3xp/menus/MenuScreen_Shell_SystemOptions.cpp index 8000ca07..5ff9d1a6 100644 --- a/neo/d3xp/menus/MenuScreen_Shell_SystemOptions.cpp +++ b/neo/d3xp/menus/MenuScreen_Shell_SystemOptions.cpp @@ -118,15 +118,15 @@ void idMenuScreen_Shell_SystemOptions::Initialize( idMenuHandler* data ) control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() ); control->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, idMenuDataSource_SystemSettings::SYSTEM_FIELD_SHADOWMAPPING ); options->AddChild( control ); - // RB end - control = new( TAG_SWF ) idMenuWidget_ControlButton(); + /*control = new( TAG_SWF ) idMenuWidget_ControlButton(); control->SetOptionType( OPTION_SLIDER_BAR ); control->SetLabel( "#str_swf_lodbias" ); control->SetDataSource( &systemData, idMenuDataSource_SystemSettings::SYSTEM_FIELD_LODBIAS ); control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() ); control->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, idMenuDataSource_SystemSettings::SYSTEM_FIELD_LODBIAS ); - options->AddChild( control ); + options->AddChild( control );*/ + // RB end control = new( TAG_SWF ) idMenuWidget_ControlButton(); control->SetOptionType( OPTION_SLIDER_BAR ); @@ -519,15 +519,15 @@ void idMenuScreen_Shell_SystemOptions::idMenuDataSource_SystemSettings::AdjustFi r_useShadowMapping.SetInteger( AdjustOption( r_useShadowMapping.GetInteger(), values, numValues, adjustAmount ) ); break; } - // RB end - case SYSTEM_FIELD_LODBIAS: + /*case SYSTEM_FIELD_LODBIAS: { const float percent = LinearAdjust( r_lodBias.GetFloat(), -1.0f, 1.0f, 0.0f, 100.0f ); const float adjusted = percent + ( float )adjustAmount * 5.0f; const float clamped = idMath::ClampFloat( 0.0f, 100.0f, adjusted ); r_lodBias.SetFloat( LinearAdjust( clamped, 0.0f, 100.0f, -1.0f, 1.0f ) ); break; - } + }*/ + // RB end case SYSTEM_FIELD_BRIGHTNESS: { const float percent = LinearAdjust( r_lightScale.GetFloat(), 2.0f, 4.0f, 0.0f, 100.0f ); @@ -615,9 +615,9 @@ idSWFScriptVar idMenuScreen_Shell_SystemOptions::idMenuDataSource_SystemSettings { return "#str_swf_disabled"; } + //case SYSTEM_FIELD_LODBIAS: + // return LinearAdjust( r_lodBias.GetFloat(), -1.0f, 1.0f, 0.0f, 100.0f ); // RB end - case SYSTEM_FIELD_LODBIAS: - return LinearAdjust( r_lodBias.GetFloat(), -1.0f, 1.0f, 0.0f, 100.0f ); case SYSTEM_FIELD_BRIGHTNESS: return LinearAdjust( r_lightScale.GetFloat(), 2.0f, 4.0f, 0.0f, 100.0f ); case SYSTEM_FIELD_VOLUME: diff --git a/neo/renderer/OpenGL/gl_Image.cpp b/neo/renderer/OpenGL/gl_Image.cpp index cf7b8fb5..568e2f7d 100644 --- a/neo/renderer/OpenGL/gl_Image.cpp +++ b/neo/renderer/OpenGL/gl_Image.cpp @@ -289,11 +289,16 @@ void idImage::SetTexParameters() glTexParameterf( target, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1 ); } } + + // RB: disabled use of unreliable extension that can make the game look worse + /* if( glConfig.textureLODBiasAvailable && ( usage != TD_FONT ) ) { // use a blurring LOD bias in combination with high anisotropy to fix our aliasing grate textures... - glTexParameterf( target, GL_TEXTURE_LOD_BIAS_EXT, r_lodBias.GetFloat() ); + glTexParameterf( target, GL_TEXTURE_LOD_BIAS_EXT, 0.5 ); //r_lodBias.GetFloat() ); } + */ + // RB end // set the wrap/clamp modes switch( repeat ) diff --git a/neo/renderer/RenderSystem_init.cpp b/neo/renderer/RenderSystem_init.cpp index f056d0d1..1640d2a0 100644 --- a/neo/renderer/RenderSystem_init.cpp +++ b/neo/renderer/RenderSystem_init.cpp @@ -80,7 +80,9 @@ idCVar r_useSeamlessCubeMap( "r_useSeamlessCubeMap", "1", CVAR_RENDERER | CVAR_B idCVar r_useSRGB( "r_useSRGB", "0", CVAR_RENDERER | CVAR_INTEGER | CVAR_ARCHIVE, "1 = both texture and framebuffer, 2 = framebuffer only, 3 = texture only" ); idCVar r_maxAnisotropicFiltering( "r_maxAnisotropicFiltering", "8", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_INTEGER, "limit aniso filtering" ); idCVar r_useTrilinearFiltering( "r_useTrilinearFiltering", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "Extra quality filtering" ); -idCVar r_lodBias( "r_lodBias", "0.5", CVAR_RENDERER | CVAR_ARCHIVE, "image lod bias" ); +// RB: not used anymore +idCVar r_lodBias( "r_lodBias", "0.5", CVAR_RENDERER | CVAR_ARCHIVE, "UNUSED: image lod bias" ); +// RB end idCVar r_useStateCaching( "r_useStateCaching", "1", CVAR_RENDERER | CVAR_BOOL, "avoid redundant state changes in GL_*() calls" );