diff --git a/Core/GameEngine/Include/Common/OptionPreferences.h b/Core/GameEngine/Include/Common/OptionPreferences.h index 2bacaa07105..a09d6eed4fc 100644 --- a/Core/GameEngine/Include/Common/OptionPreferences.h +++ b/Core/GameEngine/Include/Common/OptionPreferences.h @@ -44,8 +44,20 @@ class OptionPreferences : public UserPreferences OptionPreferences(); virtual ~OptionPreferences() override; + enum AliasingMode CPP_11(: Int) + { + OFF = 0, + X2, + X4, + X8, + NUM_ALIASING_MODES + }; + Bool loadFromIniFile(); + UnsignedInt getAntiAliasing(); + UnsignedInt getTextureFilterMode(); + UnsignedInt getTextureAnisotropyLevel(); UnsignedInt getLANIPAddress(); UnsignedInt getOnlineIPAddress(); void setLANIPAddress(AsciiString IP); diff --git a/Core/GameEngine/Source/Common/OptionPreferences.cpp b/Core/GameEngine/Source/Common/OptionPreferences.cpp index 36df300ef8a..d96269dc029 100644 --- a/Core/GameEngine/Source/Common/OptionPreferences.cpp +++ b/Core/GameEngine/Source/Common/OptionPreferences.cpp @@ -31,6 +31,9 @@ // INCLUDES /////////////////////////////////////////////////////////////////////////////////////// #include "PreRTS.h" // This must go first in EVERY cpp file in the GameEngine +#include "ww3d.h" +#include "texturefilter.h" + #include "Common/AudioSettings.h" #include "Common/GameAudio.h" #include "Common/GameLOD.h" @@ -66,6 +69,71 @@ Bool OptionPreferences::loadFromIniFile() return load("Options.ini"); } +UnsignedInt OptionPreferences::getAntiAliasing() +{ + OptionPreferences::const_iterator it = find("AntiAliasing"); + if (it == end()) + return WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_NONE; + + UnsignedInt level = atoi(it->second.str()); + if (level == WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_NONE) + level = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_NONE; + else if (level <= WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_2X) + level = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_2X; + else if (level <= WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_4X) + level = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_4X; + else if (level <= WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_8X) + level = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_8X; + + if (level > WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_8X) + level = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_8X; + + return level; +} + +UnsignedInt OptionPreferences::getTextureFilterMode() +{ + OptionPreferences::const_iterator it = find("TextureFilter"); + if (it == end()) + return TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_BILINEAR; + + UnsignedInt filter = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_NONE; + if(stricmp(it->second.str(), "None") == 0) + filter = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_NONE; + else if(stricmp(it->second.str(), "Point") == 0) + filter = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_POINT; + else if (stricmp(it->second.str(), "Bilinear") == 0) + filter = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_BILINEAR; + else if (stricmp(it->second.str(), "Trilinear") == 0) + filter = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_TRILINEAR; + else if (stricmp(it->second.str(), "Anisotropic") == 0) + filter = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_ANISOTROPIC; + + return filter; +} + +UnsignedInt OptionPreferences::getTextureAnisotropyLevel() +{ + OptionPreferences::const_iterator it = find("AnisotropyLevel"); + if (it == end()) + return TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_2X; + + UnsignedInt level = atoi(it->second.str()); + if (level <= TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_2X) + level = TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_2X; + else if (level <= TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_4X) + level = TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_4X; + else if (level <= TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_8X) + level = TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_8X; + else if (level <= TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_16X) + level = TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_16X; + + if (level > TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_16X) + level = TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_16X; + + return level; +} + Int OptionPreferences::getCampaignDifficulty() { OptionPreferences::const_iterator it = find("CampaignDifficulty"); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp index 2592ac8a9bd..c04726ea4e8 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp @@ -100,7 +100,7 @@ void TextureFilterClass::Apply(unsigned int stage) //! Init filters (legacy) /*! */ -void TextureFilterClass::_Init_Filters(TextureFilterMode filter_type) +void TextureFilterClass::_Init_Filters(TextureFilterMode texture_filter, AnisotropicFilterMode anisotropy_level) { const D3DCAPS8& dx8caps=DX8Wrapper::Get_Current_Caps()->Get_DX8_Caps(); @@ -122,7 +122,7 @@ void TextureFilterClass::_Init_Filters(TextureFilterMode filter_type) // TheSuperHackers @feature Mauller 08/03/2026 Add full support for all texture filtering modes; // None, Point, Bilinear, Trilinear, Anisotropic. BOOL FilterSupported = false; - switch (filter_type) { + switch (texture_filter) { default: // TheSuperHackers @info if we have an invalid filter_type, set the filtering to none @@ -201,8 +201,8 @@ void TextureFilterClass::_Init_Filters(TextureFilterMode filter_type) _MinTextureFilters[0][FILTER_TYPE_BEST]=D3DTEXF_ANISOTROPIC; _MagTextureFilters[0][FILTER_TYPE_BEST]=D3DTEXF_ANISOTROPIC; - // Set the Anisotropic filtering level for all stages - 2X by default - _Set_Max_Anisotropy(TEXTURE_FILTER_ANISOTROPIC_2X); + // Set the Anisotropic filtering level for all stages + _Set_Max_Anisotropy(anisotropy_level); } else { _MinTextureFilters[0][FILTER_TYPE_BEST]=D3DTEXF_POINT; diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h index 7d38431753e..2ac5b796f08 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h @@ -124,7 +124,7 @@ class TextureFilterClass void Set_V_Addr_Mode(TxtAddrMode mode) { VAddressMode=mode; } // These need to be called after device has been created - static void _Init_Filters(TextureFilterMode texture_filter); + static void _Init_Filters(TextureFilterMode texture_filter, AnisotropicFilterMode anisotropy_level); static void _Set_Max_Anisotropy(AnisotropicFilterMode mode); static void _Set_Default_Min_Filter(FilterType filter); diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h index 8fcde36e5d5..d818b4ca082 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h @@ -396,7 +396,10 @@ class GlobalData : public SubsystemInterface units will always keep their formation. If it's <1.0, then the user must click a smaller area within the rectangle to order the gather. */ - Int m_antiAliasBoxValue; ///< value of selected antialias from combo box in options menu + UnsignedInt m_antiAliasLevel; ///< value of selected antialias level in the game options + UnsignedInt m_textureFilteringMode; ///< value related to TextureFilterClass::TextureFilterModeEnum + UnsignedInt m_textureAnisotropyLevel; ///< value related to TextureFilterClass::AnisotropicFilterMode + Bool m_languageFilterPref; ///< Bool if user wants to filter language Bool m_loadScreenDemo; ///< Bool if true, run the loadscreen demo movie Bool m_disableRender; ///< if true, no rendering! diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp index 8527e8a70cd..bb14f1c9346 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp @@ -32,6 +32,9 @@ // INCLUDES /////////////////////////////////////////////////////////////////////////////////////// #include "PreRTS.h" // This must go first in EVERY cpp file in the GameEngine +#include "ww3d.h" +#include "texturefilter.h" + #include "Common/GlobalData.h" #define DEFINE_TERRAIN_LOD_NAMES @@ -930,7 +933,9 @@ GlobalData::GlobalData() m_standardPublicBones.clear(); - m_antiAliasBoxValue = 0; + m_antiAliasLevel = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_NONE; + m_textureFilteringMode = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_BILINEAR; + m_textureAnisotropyLevel = TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_2X; // m_languageFilterPref = false; m_languageFilterPref = true; @@ -1229,6 +1234,10 @@ void GlobalData::parseGameDataDefinition( INI* ini ) TheWritableGlobalData->m_playerInfoListFontSize = optionPref.getPlayerInfoListFontSize(); TheWritableGlobalData->m_showMoneyPerMinute = optionPref.getShowMoneyPerMinute(); + TheWritableGlobalData->m_antiAliasLevel = optionPref.getAntiAliasing(); + TheWritableGlobalData->m_textureFilteringMode = optionPref.getTextureFilterMode(); + TheWritableGlobalData->m_textureAnisotropyLevel = optionPref.getTextureAnisotropyLevel(); + Int val=optionPref.getGammaValue(); //generate a value between 0.6 and 2.0. if (val < 50) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp index 2c26f935a9f..682e51cd263 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp @@ -75,6 +75,7 @@ #include "GameClient/MessageBox.h" #include "ww3d.h" +#include "texturefilter.h" // This is for non-RC builds only!!! #define VERBOSE_VERSION L"Release" @@ -552,14 +553,73 @@ static void saveOptions() //------------------------------------------------------------------------------------------------- // antialiasing GadgetComboBoxGetSelectedPos(comboBoxAntiAliasing, &index); - if( index >= 0 && TheGlobalData->m_antiAliasBoxValue != index ) + if( index >= 0 && TheGlobalData ) { - TheWritableGlobalData->m_antiAliasBoxValue = index; + Int mode = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_NONE; + + // TheSuperHackers @info We are converting comboBox entry position to human readable value + switch (index) { + default: + case OptionPreferences::AliasingMode::OFF: + mode = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_NONE; + break; + case OptionPreferences::AliasingMode::X2: + mode = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_2X; + break; + case OptionPreferences::AliasingMode::X4: + mode = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_4X; + break; + case OptionPreferences::AliasingMode::X8: + mode = WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_8X; + break; + } + + TheWritableGlobalData->m_antiAliasLevel = mode; AsciiString prefString; - prefString.format("%d", index); + prefString.format("%d", mode); (*pref)["AntiAliasing"] = prefString; } + //------------------------------------------------------------------------------------------------- + // texture filter mode + val = pref->getTextureFilterMode(); + if (val >= 0 && TheGlobalData) + { + TheWritableGlobalData->m_textureFilteringMode = val; + + AsciiString prefString; + + switch (val) { + case TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_NONE: + prefString = "None"; + break; + case TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_POINT: + prefString = "Point"; + break; + case TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_BILINEAR: + prefString = "Bilinear"; + break; + case TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_TRILINEAR: + prefString = "Trilinear"; + break; + case TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_ANISOTROPIC: + prefString = "Anisotropic"; + break; + } + + (*pref)["TextureFilter"] = prefString; + } + + //------------------------------------------------------------------------------------------------- + // anisotropy level + val = pref->getTextureAnisotropyLevel(); + if (val >= 0 && TheGlobalData) + { + TheWritableGlobalData->m_textureAnisotropyLevel = val; + AsciiString prefString; + prefString.format("%d", val); + (*pref)["AnisotropyLevel"] = prefString; + } //------------------------------------------------------------------------------------------------- // mouse mode @@ -1024,14 +1084,6 @@ void OptionsMenuInit( WindowLayout *layout, void *userData ) Color color = GameMakeColor(255,255,255,255); - enum AliasingMode CPP_11(: Int) - { - OFF = 0, - LOW, - HIGH, - NUM_ALIASING_MODES - }; - initLabelVersion(); // Choose an IP address, then initialize the IP combo box @@ -1135,18 +1187,30 @@ void OptionsMenuInit( WindowLayout *layout, void *userData ) GadgetComboBoxReset(comboBoxAntiAliasing); AsciiString temp; Int i=0; - for (; i < NUM_ALIASING_MODES; ++i) + for (; i < OptionPreferences::AliasingMode::NUM_ALIASING_MODES; ++i) { temp.format("GUI:AntiAliasing%d", i); str = TheGameText->fetch( temp ); index = GadgetComboBoxAddEntry(comboBoxAntiAliasing, str, color); } Int val = atoi(selectedAliasingMode.str()); - if( val < 0 || val > NUM_ALIASING_MODES ) + Int pos = 0; + + // TheSuperHackers @info We are converting from human readable value to comboBox entry position + if (val <= WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_NONE) + pos = OptionPreferences::AliasingMode::OFF; + else if (val <= WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_2X) + pos = OptionPreferences::AliasingMode::X2; + else if (val <= WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_4X) + pos = OptionPreferences::AliasingMode::X4; + else if (val <= WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_8X) + pos = OptionPreferences::AliasingMode::X8; + + if( val < 0 || val > WW3D::MultiSampleModeEnum::MULTISAMPLE_MODE_8X) { - TheWritableGlobalData->m_antiAliasBoxValue = val = 0; + TheWritableGlobalData->m_antiAliasLevel = pos = 0; } - GadgetComboBoxSetSelectedPos(comboBoxAntiAliasing, val); + GadgetComboBoxSetSelectedPos(comboBoxAntiAliasing, pos); // get resolution from saved preferences file AsciiString selectedResolution = (*pref) ["Resolution"]; diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index e34e4428649..41f74e03144 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -762,7 +762,7 @@ void W3DDisplay::init() } // TheSuperHackers @feature Mauller 13/03/2026 Add native MSAA support, must be set before creating render device - WW3D::Set_MSAA_Mode(WW3D::MULTISAMPLE_MODE_NONE); + WW3D::Set_MSAA_Mode((WW3D::MultiSampleModeEnum)TheWritableGlobalData->m_antiAliasLevel); renderDeviceError = WW3D::Set_Render_Device( 0, @@ -772,6 +772,14 @@ void W3DDisplay::init() getWindowed(), true ); + // TheSuperHackers @info Update the MSAA mode that was set as some GPU's may not support certain levels + // Texture filtering must be also be updated after render device initialisation + TheWritableGlobalData->m_antiAliasLevel = (UnsignedInt)WW3D::Get_MSAA_Mode(); + WW3D::Set_Texture_Filter(TheWritableGlobalData->m_textureFilteringMode); + TheWritableGlobalData->m_textureFilteringMode = WW3D::Get_Texture_Filter(); + WW3D::Set_Anisotropy_level(TheWritableGlobalData->m_textureAnisotropyLevel); + TheWritableGlobalData->m_textureAnisotropyLevel = WW3D::Get_Anisotropy_level(); + ++attempt; } while (attempt < 3 && renderDeviceError != WW3D_ERROR_OK); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp index 82a48499509..d1c3edf873a 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp @@ -411,7 +411,10 @@ void DX8Wrapper::Do_Onetime_Device_Dependent_Inits() ** Initialize any other subsystems inside of WW3D */ MissingTexture::_Init(); - TextureFilterClass::_Init_Filters((TextureFilterClass::TextureFilterMode)WW3D::Get_Texture_Filter()); + TextureFilterClass::_Init_Filters( + (TextureFilterClass::TextureFilterMode)WW3D::Get_Texture_Filter(), + (TextureFilterClass::AnisotropicFilterMode)WW3D::Get_Anisotropy_level() + ); TheDX8MeshRenderer.Init(); SHD_INIT; BoxRenderObjClass::Init(); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp index 2aa6e707339..0f26a042c48 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.cpp @@ -223,6 +223,7 @@ int WW3D::LastFrameMemoryAllocations; int WW3D::LastFrameMemoryFrees; int WW3D::TextureFilter = TextureFilterClass::TextureFilterMode::TEXTURE_FILTER_BILINEAR; +int WW3D::AnisotropyLevel = TextureFilterClass::AnisotropicFilterMode::TEXTURE_FILTER_ANISOTROPIC_2X; bool WW3D::Lite = false; @@ -768,9 +769,29 @@ void WW3D::Set_Texture_Filter(int texture_filter) if (texture_filter<0) texture_filter=0; if (texture_filter>TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC) texture_filter=TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC; TextureFilter=texture_filter; - TextureFilterClass::_Init_Filters((TextureFilterClass::TextureFilterMode)TextureFilter); + TextureFilterClass::_Init_Filters( + (TextureFilterClass::TextureFilterMode)TextureFilter, + (TextureFilterClass::AnisotropicFilterMode)AnisotropyLevel + ); } +void WW3D::Set_Anisotropy_level(int level) +{ + if (level <= TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_2X) + level = TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_2X; + else if(level <= TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_4X) + level = TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_4X; + else if (level <= TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_8X) + level = TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_8X; + else if (level <= TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_16X) + level = TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_16X; + + if (level > TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_16X) + level = TextureFilterClass::TEXTURE_FILTER_ANISOTROPIC_16X; + + AnisotropyLevel = level; + TextureFilterClass::_Set_Max_Anisotropy((TextureFilterClass::AnisotropicFilterMode)AnisotropyLevel); +} /*********************************************************************************************** * WW3D::Begin_Render -- mark the start of rendering for a new frame * diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.h index b70c737e066..d28221c5897 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ww3d.h @@ -73,10 +73,10 @@ class WW3D public: enum MultiSampleModeEnum { - MULTISAMPLE_MODE_NONE, - MULTISAMPLE_MODE_2X, - MULTISAMPLE_MODE_4X, - MULTISAMPLE_MODE_8X + MULTISAMPLE_MODE_NONE = 0, + MULTISAMPLE_MODE_2X = 2, + MULTISAMPLE_MODE_4X = 4, + MULTISAMPLE_MODE_8X = 8 }; enum PrelitModeEnum { @@ -143,6 +143,9 @@ class WW3D static void Set_Texture_Filter(int filter); static int Get_Texture_Filter() { return TextureFilter; } + static void Set_Anisotropy_level(int level); + static int Get_Anisotropy_level() { return AnisotropyLevel; } + /* ** Rendering functions ** Each frame should be bracketed by a Begin_Render and End_Render call. Between these two calls you will @@ -396,6 +399,7 @@ class WW3D static bool ExposePrelit; static int TextureFilter; + static int AnisotropyLevel; static bool SnapshotActivated; static bool ThumbnailEnabled;