-
Notifications
You must be signed in to change notification settings - Fork 176
feat(options): Implement game options for texture filter mode, anisotropy and MSAA selection #2482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these need to be in GlobalData or is there a better place for them?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's not really a nice place to centralise them apart from global data, Texture Class is mostly handled by static functions and MSAA is handled inside dx8wrapper through ww3d. |
||
|
|
||
| // 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) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an intuitive term for players? If I am not mistaken NVIDIA and AMD drivers call this Anisotropic.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's often hidden by having the user facing texture filter mode option showing
Anisotropic x2, Anisotropic x4etcThe underlying graphics API's use Anisotropy level to set the sampling mode for Anisotropic filtering.