Merge remote-tracking branch 'refs/remotes/upstream/development'

Conflicts:
	Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript
This commit is contained in:
Samuel Skiff 2022-08-30 05:16:25 -05:00
commit 606da2e8ba
20 changed files with 94 additions and 96 deletions

View file

@ -491,7 +491,7 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
{ {
//if we don't have a target object, we'll be manipulating the desination value directly //if we don't have a target object, we'll be manipulating the desination value directly
char szBuffer[512]; char szBuffer[512];
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);", dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, \"%s\");",
mInspector->getIdString(), mVariableName); mInspector->getIdString(), mVariableName);
mBrowseButton->setField("Command", szBuffer); mBrowseButton->setField("Command", szBuffer);
} }

View file

@ -491,7 +491,7 @@ GuiControl* GuiInspectorTypeMaterialAssetPtr::constructEditControl()
else else
{ {
//if we don't have a target object, we'll be manipulating the desination value directly //if we don't have a target object, we'll be manipulating the desination value directly
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"MaterialAsset\", \"AssetBrowser.changeAsset\", %s, %s);", dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"MaterialAsset\", \"AssetBrowser.changeAsset\", %s, \"%s\");",
mInspector->getIdString(), mVariableName); mInspector->getIdString(), mVariableName);
mBrowseButton->setField("Command", szBuffer); mBrowseButton->setField("Command", szBuffer);
} }

View file

@ -760,7 +760,7 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl()
else else
{ {
//if we don't have a target object, we'll be manipulating the desination value directly //if we don't have a target object, we'll be manipulating the desination value directly
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %s, %s);", dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %s, \"%s\");",
mInspector->getIdString(), mVariableName); mInspector->getIdString(), mVariableName);
mBrowseButton->setField("Command", szBuffer); mBrowseButton->setField("Command", szBuffer);
} }

View file

@ -137,7 +137,7 @@ void WaterMatParams::init( BaseMatInstance* matInst )
bool WaterObject::smWireframe = false; bool WaterObject::smWireframe = false;
bool WaterObject::smDisableTrueReflections = false; bool WaterObject::smEnableTrueReflections = true;
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// WaterObject Class // WaterObject Class
@ -406,7 +406,7 @@ void WaterObject::consoleInit()
{ {
Parent::consoleInit(); Parent::consoleInit();
Con::addVariable( "$pref::Water::disableTrueReflections", TypeBool, &WaterObject::smDisableTrueReflections, Con::addVariable( "$pref::Water::EnableTrueReflections", TypeBool, &WaterObject::smEnableTrueReflections,
"Force all water objects to use static cubemap reflections.\n" "Force all water objects to use static cubemap reflections.\n"
"@ingroup Water"); "@ingroup Water");
} }
@ -438,7 +438,7 @@ bool WaterObject::_setFullReflect( void *object, const char *index, const char *
{ {
bool isEnabled = water->mPlaneReflector.isEnabled(); bool isEnabled = water->mPlaneReflector.isEnabled();
bool enable = water->mFullReflect && !smDisableTrueReflections; bool enable = water->mFullReflect && smEnableTrueReflections;
if ( enable && !isEnabled ) if ( enable && !isEnabled )
water->mPlaneReflector.registerReflector( water, &water->mReflectorDesc ); water->mPlaneReflector.registerReflector( water, &water->mReflectorDesc );
@ -582,7 +582,7 @@ void WaterObject::unpackUpdate( NetConnection * conn, BitStream *stream )
mReflectorDesc.useOcclusionQuery = stream->readFlag(); mReflectorDesc.useOcclusionQuery = stream->readFlag();
mReflectorDesc.texSize = stream->readInt( 32 ); mReflectorDesc.texSize = stream->readInt( 32 );
if ( isProperlyAdded() && !mPlaneReflector.isEnabled() && !smDisableTrueReflections ) if ( isProperlyAdded() && !mPlaneReflector.isEnabled() && smEnableTrueReflections )
mPlaneReflector.registerReflector( this, &mReflectorDesc ); mPlaneReflector.registerReflector( this, &mReflectorDesc );
} }
else else
@ -868,8 +868,8 @@ bool WaterObject::onAdd()
if ( !Parent::onAdd() ) if ( !Parent::onAdd() )
return false; return false;
Con::NotifyDelegate clbk( this, &WaterObject::_onDisableTrueRelfections ); Con::NotifyDelegate clbk( this, &WaterObject::_onEnableTrueReflections );
Con::addVariableNotify( "$pref::Water::disableTrueReflections", clbk ); Con::addVariableNotify( "$pref::Water::EnableTrueReflections", clbk );
if ( isClientObject() ) if ( isClientObject() )
{ {
@ -886,7 +886,7 @@ bool WaterObject::onAdd()
initTextures(); initTextures();
if ( mFullReflect && !smDisableTrueReflections ) if ( mFullReflect && smEnableTrueReflections )
mPlaneReflector.registerReflector( this, &mReflectorDesc ); mPlaneReflector.registerReflector( this, &mReflectorDesc );
} }
@ -895,8 +895,8 @@ bool WaterObject::onAdd()
void WaterObject::onRemove() void WaterObject::onRemove()
{ {
Con::NotifyDelegate clbk( this, &WaterObject::_onDisableTrueRelfections ); Con::NotifyDelegate clbk( this, &WaterObject::_onEnableTrueReflections );
Con::removeVariableNotify( "$pref::Water::disableTrueReflections", clbk ); Con::removeVariableNotify( "$pref::Water::EnableTrueReflections", clbk );
if ( isClientObject() ) if ( isClientObject() )
{ {
@ -911,14 +911,14 @@ void WaterObject::onRemove()
Parent::onRemove(); Parent::onRemove();
} }
void WaterObject::_onDisableTrueRelfections() void WaterObject::_onEnableTrueReflections()
{ {
// Same code as _setFullReflect // Same code as _setFullReflect
if ( isProperlyAdded() && isClientObject() ) if ( isProperlyAdded() && isClientObject() )
{ {
bool isEnabled = mPlaneReflector.isEnabled(); bool isEnabled = mPlaneReflector.isEnabled();
bool enable = mFullReflect && !smDisableTrueReflections; bool enable = mFullReflect && smEnableTrueReflections;
if ( enable && !isEnabled ) if ( enable && !isEnabled )
mPlaneReflector.registerReflector( this, &mReflectorDesc ); mPlaneReflector.registerReflector( this, &mReflectorDesc );

View file

@ -199,8 +199,8 @@ protected:
virtual void _getWaterPlane( const Point3F &camPos, PlaneF &outPlane, Point3F &outPos ) {} virtual void _getWaterPlane( const Point3F &camPos, PlaneF &outPlane, Point3F &outPos ) {}
/// Callback used internally when smDisableTrueReflections changes. /// Callback used internally when smEnableTrueReflections changes.
void _onDisableTrueRelfections(); void _onEnableTrueReflections();
void onRippleTexChanged() {} void onRippleTexChanged() {}
void onFoamTexChanged() {} void onFoamTexChanged() {}
@ -307,7 +307,7 @@ protected:
static bool smWireframe; static bool smWireframe;
/// Force all water objects to use static cubemap reflections /// Force all water objects to use static cubemap reflections
static bool smDisableTrueReflections; static bool smEnableTrueReflections;
// Rendering // Rendering
bool mBasicLighting; bool mBasicLighting;

View file

@ -228,7 +228,7 @@ DXGI_SWAP_CHAIN_DESC GFXD3D11Device::setupPresentParams(const GFXVideoMode &mode
mMultisampleDesc = sampleDesc; mMultisampleDesc = sampleDesc;
d3dpp.BufferCount = !smDisableVSync ? 2 : 1; // triple buffering when vsync is on. d3dpp.BufferCount = smEnableVSync ? 2 : 1; // triple buffering when vsync is on.
d3dpp.BufferDesc.Width = mode.resolution.x; d3dpp.BufferDesc.Width = mode.resolution.x;
d3dpp.BufferDesc.Height = mode.resolution.y; d3dpp.BufferDesc.Height = mode.resolution.y;
d3dpp.BufferDesc.Format = GFXD3D11TextureFormat[GFXFormatR8G8B8A8_SRGB]; d3dpp.BufferDesc.Format = GFXD3D11TextureFormat[GFXFormatR8G8B8A8_SRGB];

View file

@ -367,7 +367,7 @@ GFXFormat GFXD3D11WindowTarget::getFormat()
bool GFXD3D11WindowTarget::present() bool GFXD3D11WindowTarget::present()
{ {
HRESULT hr = mSwapChain->Present(!D3D11->smDisableVSync, 0); HRESULT hr = mSwapChain->Present(D3D11->smEnableVSync, 0);
if (hr == DXGI_ERROR_DEVICE_REMOVED) if (hr == DXGI_ERROR_DEVICE_REMOVED)
{ {
HRESULT result = D3D11->getDevice()->GetDeviceRemovedReason(); HRESULT result = D3D11->getDevice()->GetDeviceRemovedReason();

View file

@ -47,7 +47,7 @@
GFXDevice * GFXDevice::smGFXDevice = NULL; GFXDevice * GFXDevice::smGFXDevice = NULL;
bool GFXDevice::smWireframe = false; bool GFXDevice::smWireframe = false;
bool GFXDevice::smDisableVSync = true; bool GFXDevice::smEnableVSync = false;
F32 GFXDevice::smForcedPixVersion = -1.0f; F32 GFXDevice::smForcedPixVersion = -1.0f;
bool GFXDevice::smDisableOcclusionQuery = false; bool GFXDevice::smDisableOcclusionQuery = false;
bool gDisassembleAllShaders = false; bool gDisassembleAllShaders = false;
@ -71,8 +71,8 @@ void GFXDevice::initConsole()
"them to return only the visibile state.\n" "them to return only the visibile state.\n"
"@ingroup GFX\n" ); "@ingroup GFX\n" );
Con::addVariable( "$pref::Video::disableVerticalSync", TypeBool, &smDisableVSync, Con::addVariable( "$pref::Video::enableVerticalSync", TypeBool, &smEnableVSync,
"Disables vertical sync on the active device.\n" "Enables vertical sync on the active device.\n"
"@note The video mode must be reset for the change to take affect.\n" "@note The video mode must be reset for the change to take affect.\n"
"@ingroup GFX\n" ); "@ingroup GFX\n" );

View file

@ -525,7 +525,7 @@ protected:
static bool smWireframe; static bool smWireframe;
/// The global vsync state. /// The global vsync state.
static bool smDisableVSync; static bool smEnableVSync;
/// The forced shader model version if non-zero. /// The forced shader model version if non-zero.
static F32 smForcedPixVersion; static F32 smForcedPixVersion;

View file

@ -180,11 +180,11 @@ void GFXGLDevice::initGLState()
} }
#endif #endif
PlatformGL::setVSync(smDisableVSync ? 0 : 1); PlatformGL::setVSync(smEnableVSync);
//install vsync callback //install vsync callback
Con::NotifyDelegate clbk(this, &GFXGLDevice::vsyncCallback); Con::NotifyDelegate clbk(this, &GFXGLDevice::vsyncCallback);
Con::addVariableNotify("$pref::Video::disableVerticalSync", clbk); Con::addVariableNotify("$pref::Video::enableVerticalSync", clbk);
//OpenGL 3 need a binded VAO for render //OpenGL 3 need a binded VAO for render
GLuint vao; GLuint vao;
@ -200,7 +200,7 @@ void GFXGLDevice::initGLState()
void GFXGLDevice::vsyncCallback() void GFXGLDevice::vsyncCallback()
{ {
PlatformGL::setVSync(smDisableVSync ? 0 : 1); PlatformGL::setVSync(smEnableVSync);
} }
GFXGLDevice::GFXGLDevice(U32 adapterIndex) : GFXGLDevice::GFXGLDevice(U32 adapterIndex) :

View file

@ -776,44 +776,28 @@ IMPLEMENT_CONOBJECT(GuiGameSettingsCtrl);
void GuiGameSettingsCtrl::clickSlider(S32 xPos) void GuiGameSettingsCtrl::clickSlider(S32 xPos)
{ {
F32 xScale = (float)getWidth(); RectI sliderRect;
S32 leftArrowX1 = mColumnSplit; S32 sliderOffset = 5;
S32 leftArrowX2 = leftArrowX1 + mArrowSize; S32 height = getHeight();
S32 rightArrowX2 = getWidth() - mRightPad; RectI optionRect;
S32 rightArrowX1 = rightArrowX2 - mArrowSize;
S32 sliderWidth = rightArrowX1 - leftArrowX2; sliderRect.point.x = mColumnSplit + mArrowSize;
sliderWidth *= 0.6; //remove the number text spacing sliderRect.point.y = sliderOffset;
/*if ((leftArrowX1 <= xPos) && (xPos <= leftArrowX2)) sliderRect.extent.x = (getWidth() - mRightPad - mArrowSize) - sliderRect.point.x;
{ sliderRect.extent.y = height - sliderOffset * 2;
mValue -= mStepSize;
mValue = mRound(mValue / mStepSize) * mStepSize; optionRect = sliderRect;
if (mValue < mRange.x) S32 textWidth = sliderRect.extent.x * 0.3;
mValue = mRange.x; sliderRect.extent.x -= textWidth;
} //Now adjust the bar to match-to our value
else if ((rightArrowX1 <= xPos) && (xPos <= rightArrowX2))
{
//F32 snap = mValue % mStepSize;
//mValue.y -= snap;
mValue += mStepSize; S32 barStart = sliderRect.point.x;
S32 barEnd = sliderRect.point.x + sliderRect.extent.x;
mValue = mRound(mValue / mStepSize) * mStepSize;
if (mValue > mRange.y)
mValue = mRange.y;
}
else
{*/
//see if we clicked on the sliderbar itself
S32 barStart = leftArrowX2;
S32 barEnd = barStart + sliderWidth;
if (xPos >= barStart && xPos <= barEnd) if (xPos >= barStart && xPos <= barEnd)
{ {
@ -824,7 +808,6 @@ void GuiGameSettingsCtrl::clickSlider(S32 xPos)
mValue = newValue; mValue = newValue;
} }
//}
onChange_callback(); onChange_callback();
} }

View file

@ -87,8 +87,8 @@ MaterialManager::MaterialManager()
Con::addVariableNotify( "$pref::Video::disableNormalMapping", callabck2 ); Con::addVariableNotify( "$pref::Video::disableNormalMapping", callabck2 );
Con::setVariable( "$pref::Video::disableCubemapping", "false" ); Con::setVariable( "$pref::Video::disableCubemapping", "false" );
Con::addVariableNotify( "$pref::Video::disableCubemapping", callabck2 ); Con::addVariableNotify( "$pref::Video::disableCubemapping", callabck2 );
Con::setVariable( "$pref::Video::disableParallaxMapping", "false" ); Con::setVariable( "$pref::Video::enableParallaxMapping", "true" );
Con::addVariableNotify( "$pref::Video::disableParallaxMapping", callabck2 ); Con::addVariableNotify( "$pref::Video::enableParallaxMapping", callabck2 );
} }
MaterialManager::~MaterialManager() MaterialManager::~MaterialManager()
@ -472,7 +472,7 @@ void MaterialManager::recalcFeaturesFromPrefs()
Con::getBoolVariable( "$pref::Video::disableCubemapping", false ) ); Con::getBoolVariable( "$pref::Video::disableCubemapping", false ) );
mExclusionFeatures.setFeature( MFT_Parallax, mExclusionFeatures.setFeature( MFT_Parallax,
Con::getBoolVariable( "$pref::Video::disableParallaxMapping", false ) ); !Con::getBoolVariable( "$pref::Video::enableParallaxMapping", true ) );
} }
bool MaterialManager::_handleGFXEvent( GFXDevice::GFXDeviceEventType event_ ) bool MaterialManager::_handleGFXEvent( GFXDevice::GFXDeviceEventType event_ )

View file

@ -45,12 +45,12 @@ function clientCmdMissionStartPhase1_LoadCache(%seq, %levelAsset)
{ {
if ($pref::Client::EnableDatablockCache && $loadFromDatablockCache) if ($pref::Client::EnableDatablockCache && $loadFromDatablockCache)
{ {
if (!$pref::Video::disableVerticalSync) if ($pref::Video::enableVerticalSync)
{ {
warn("Disabling Vertical Sync during datablock cache load to avoid significant slowdown."); warn("Disabling Vertical Sync during datablock cache load to avoid significant slowdown.");
$AFX_tempDisableVSync = true; $AFX_tempDisableVSync = true;
$pref::Video::disableVerticalSync = true; $pref::Video::enableVerticalSync = false;
Canvas.resetVideoMode(); Canvas.resetVideoMode();
} }
@ -75,7 +75,7 @@ function updateLoadDatablockCacheProgress(%seq, %levelAsset)
warn("Restoring Vertical Sync setting."); warn("Restoring Vertical Sync setting.");
$AFX_tempDisableVSync = false; $AFX_tempDisableVSync = false;
$pref::Video::disableVerticalSync = false; $pref::Video::enableVerticalSync = true;
Canvas.resetVideoMode(); Canvas.resetVideoMode();
} }
@ -96,7 +96,7 @@ function updateLoadDatablockCacheProgress(%seq, %levelAsset)
warn("Restoring Vertical Sync setting."); warn("Restoring Vertical Sync setting.");
$AFX_tempDisableVSync = false; $AFX_tempDisableVSync = false;
$pref::Video::disableVerticalSync = false; $pref::Video::enableVerticalSync = true;
Canvas.resetVideoMode(); Canvas.resetVideoMode();
} }

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
$PostFX::BloomPostFX::Enabled = "1"; $PostFX::BloomPostFX::Enabled = "1";
$PostFX::BloomPostFX::threshold = "0.5"; $PostFX::BloomPostFX::threshold = "0.5";
$PostFX::BloomPostFX::intensity = "0.5"; $PostFX::BloomPostFX::intensity = "0.5";
@ -19,6 +20,8 @@ $PostFX::HDRPostFX::minLuminace = "0.001";
$PostFX::HDRPostFX::adaptRate = "0.85"; $PostFX::HDRPostFX::adaptRate = "0.85";
$PostFX::HDRPostFX::tonemapMode = "ACES"; $PostFX::HDRPostFX::tonemapMode = "ACES";
$PostFX::HDRPostFX::enableBloom = "1"; $PostFX::HDRPostFX::enableBloom = "1";
=======
>>>>>>> development
$PostFX::HDRPostFX::brightPassThreshold = "0.02"; $PostFX::HDRPostFX::brightPassThreshold = "0.02";
$PostFX::HDRPostFX::gaussMultiplier = "0.4"; $PostFX::HDRPostFX::gaussMultiplier = "0.4";
$PostFX::HDRPostFX::enableAutoExposure = "1"; $PostFX::HDRPostFX::enableAutoExposure = "1";

View file

@ -50,6 +50,13 @@ function postFXInit()
while( %file !$= "" ) while( %file !$= "" )
{ {
//we need to make sure we don't inadvertently forcefully exec the default postfx preset
if(fileName(%file) $= "default.postfxpreset.tscript")
{
%file = findNextFile( %pattern );
continue;
}
exec( %file ); exec( %file );
%file = findNextFile( %pattern ); %file = findNextFile( %pattern );
} }

View file

@ -678,8 +678,8 @@ function AutodetectGraphics_Apply(%shaderVer, %intel, %videoMem )
$pref::Shadows::useShadowCaching = true; $pref::Shadows::useShadowCaching = true;
$pref::Water::disableTrueReflections = true; $pref::Water::enableTrueReflections = false;
$pref::Video::disableParallaxMapping = true; $pref::Video::enableParallaxMapping = false;
$pref::PostFX::EnableSSAO = false; $pref::PostFX::EnableSSAO = false;
$pref::PostFX::EnableHDR = false; $pref::PostFX::EnableHDR = false;
$pref::PostFX::EnableDOF = false; $pref::PostFX::EnableDOF = false;
@ -704,8 +704,8 @@ function AutodetectGraphics_Apply(%shaderVer, %intel, %videoMem )
$pref::Shadows::useShadowCaching = true; $pref::Shadows::useShadowCaching = true;
$pref::Water::disableTrueReflections = true; $pref::Water::enableTrueReflections = false;
$pref::Video::disableParallaxMapping = true; $pref::Video::enableParallaxMapping = false;
$pref::PostFX::EnableSSAO = false; $pref::PostFX::EnableSSAO = false;
$pref::PostFX::EnableHDR = false; $pref::PostFX::EnableHDR = false;
$pref::PostFX::EnableDOF = false; $pref::PostFX::EnableDOF = false;
@ -734,8 +734,8 @@ function AutodetectGraphics_Apply(%shaderVer, %intel, %videoMem )
//Should this default to on in ultra settings? //Should this default to on in ultra settings?
$pref::Shadows::useShadowCaching = true; $pref::Shadows::useShadowCaching = true;
$pref::Water::disableTrueReflections = false; $pref::Water::enableTrueReflections = true;
$pref::Video::disableParallaxMapping = false; $pref::Video::enableParallaxMapping = true;
$pref::PostFX::EnableSSAO = true; $pref::PostFX::EnableSSAO = true;
$pref::PostFX::EnableHDR = true; $pref::PostFX::EnableHDR = true;
$pref::PostFX::EnableDOF = true; $pref::PostFX::EnableDOF = true;
@ -760,8 +760,8 @@ function AutodetectGraphics_Apply(%shaderVer, %intel, %videoMem )
$pref::Shadows::useShadowCaching = true; $pref::Shadows::useShadowCaching = true;
$pref::Water::disableTrueReflections = false; $pref::Water::enableTrueReflections = true;
$pref::Video::disableParallaxMapping = true; $pref::Video::enableParallaxMapping = true;
$pref::PostFX::EnableSSAO = false; $pref::PostFX::EnableSSAO = false;
$pref::PostFX::EnableHDR = true; $pref::PostFX::EnableHDR = true;
$pref::PostFX::EnableDOF = true; $pref::PostFX::EnableDOF = true;
@ -789,8 +789,8 @@ function AutodetectGraphics_Apply(%shaderVer, %intel, %videoMem )
$pref::Shadows::useShadowCaching = true; $pref::Shadows::useShadowCaching = true;
$pref::Water::disableTrueReflections = false; $pref::Water::enableTrueReflections = true;
$pref::Video::disableParallaxMapping = true; $pref::Video::enableParallaxMapping = true;
$pref::PostFX::EnableSSAO = false; $pref::PostFX::EnableSSAO = false;
$pref::PostFX::EnableHDR = false; $pref::PostFX::EnableHDR = false;
$pref::PostFX::EnableDOF = false; $pref::PostFX::EnableDOF = false;

View file

@ -37,7 +37,7 @@ $pref::Input::JoystickEnabled = 0;
// Set directory paths for various data or default images. // Set directory paths for various data or default images.
$pref::Video::ProfilePath = "core/rendering/scripts/gfxprofile"; $pref::Video::ProfilePath = "core/rendering/scripts/gfxprofile";
$pref::Video::disableVerticalSync = 1; $pref::Video::enableVerticalSync = 0;
$pref::Video::mode = "1920 1080 false 32 60 4"; $pref::Video::mode = "1920 1080 false 32 60 4";
$pref::Video::defaultFenceCount = 0; $pref::Video::defaultFenceCount = 0;
@ -50,7 +50,7 @@ $pref::Video::disableHardwareAA = true;
$pref::Video::disableNormalmapping = false; $pref::Video::disableNormalmapping = false;
$pref::Video::disablePixSpecular = false; $pref::Video::disablePixSpecular = false;
$pref::Video::disableCubemapping = false; $pref::Video::disableCubemapping = false;
$pref::Video::disableParallaxMapping = false; $pref::Video::enableParallaxMapping = true;
// The number of mipmap levels to drop on loaded textures to reduce video memory // The number of mipmap levels to drop on loaded textures to reduce video memory
// usage. It will skip any textures that have been defined as not allowing down // usage. It will skip any textures that have been defined as not allowing down

View file

@ -444,7 +444,7 @@ function populateDisplaySettingsList()
OptionsMenuSettingsList.addOptionRow("Resolution", "$pref::Video::Resolution", %resolutionList, false, "", true, "Resolution of the game window", %resolution); OptionsMenuSettingsList.addOptionRow("Resolution", "$pref::Video::Resolution", %resolutionList, false, "", true, "Resolution of the game window", %resolution);
} }
OptionsMenuSettingsList.addOptionBoolRow("VSync", "$pref::Video::disableVerticalSync", $yesNoList, false, "", true, "", ""); OptionsMenuSettingsList.addOptionBoolRow("VSync", "$pref::Video::enableVerticalSync", $YesNoList, false, "", true, "", "");
%refreshList = getScreenRefreshList($pref::Video::mode); %refreshList = getScreenRefreshList($pref::Video::mode);
@ -504,8 +504,8 @@ function populateGraphicsSettingsList()
OptionsMenuSettingsList.addOptionRow("Anisotropic Filtering", "$pref::Video::defaultAnisotropy", %anisoFilter, false, "", true, "Amount of Anisotropic Filtering on textures, which dictates their sharpness at a distance"); OptionsMenuSettingsList.addOptionRow("Anisotropic Filtering", "$pref::Video::defaultAnisotropy", %anisoFilter, false, "", true, "Amount of Anisotropic Filtering on textures, which dictates their sharpness at a distance");
OptionsMenuSettingsList.addOptionRow("Anti-Aliasing", "$pref::Video::AA", %aaFilter, false, "", true, "Amount of Post-Processing Anti-Aliasing applied to rendering"); OptionsMenuSettingsList.addOptionRow("Anti-Aliasing", "$pref::Video::AA", %aaFilter, false, "", true, "Amount of Post-Processing Anti-Aliasing applied to rendering");
OptionsMenuSettingsList.addOptionBoolRow("Parallax", "$pref::Video::disableParallaxMapping", %onOffList, false, "", true, "Whether the surface parallax shader effect is enabled", ""); OptionsMenuSettingsList.addOptionBoolRow("Parallax", "$pref::Video::enableParallaxMapping", %onOffList, false, "", true, "Whether the surface parallax shader effect is enabled", "");
OptionsMenuSettingsList.addOptionBoolRow("Water Reflections", "$pref::Water::disableTrueReflections", %onOffList, false, "", true, "Whether water reflections are enabled", ""); OptionsMenuSettingsList.addOptionBoolRow("Water Reflections", "$pref::Water::enableTrueReflections", %onOffList, false, "", true, "Whether water reflections are enabled", "");
OptionsMenuSettingsList.addOptionBoolRow("SSAO", "$pref::PostFX::EnableSSAO", %onOffList, false, "", true, "Whether Screen-Space Ambient Occlusion is enabled"); OptionsMenuSettingsList.addOptionBoolRow("SSAO", "$pref::PostFX::EnableSSAO", %onOffList, false, "", true, "Whether Screen-Space Ambient Occlusion is enabled");
OptionsMenuSettingsList.addOptionBoolRow("Depth of Field", "$pref::PostFX::EnableDOF", %onOffList, false, "", true, "Whether the Depth of Field effect is enabled"); OptionsMenuSettingsList.addOptionBoolRow("Depth of Field", "$pref::PostFX::EnableDOF", %onOffList, false, "", true, "Whether the Depth of Field effect is enabled");
@ -581,7 +581,7 @@ function updateDisplaySettings()
%newBpp = 32; // ... its not 1997 anymore. %newBpp = 32; // ... its not 1997 anymore.
%newFullScreen = %deviceModeName $= "Fullscreen" ? true : false; %newFullScreen = %deviceModeName $= "Fullscreen" ? true : false;
%newRefresh = $pref::Video::RefreshRate; %newRefresh = $pref::Video::RefreshRate;
%newVsync = !$pref::Video::disableVerticalSync; %newVsync = $pref::Video::enableVerticalSync;
%newFSAA = $pref::Video::AA; %newFSAA = $pref::Video::AA;
// Build the final mode string. // Build the final mode string.
@ -589,7 +589,7 @@ function updateDisplaySettings()
// Change the video mode. // Change the video mode.
if ( %newMode !$= $pref::Video::mode || %newDeviceID != $pref::Video::deviceId || if ( %newMode !$= $pref::Video::mode || %newDeviceID != $pref::Video::deviceId ||
%newVsync != $pref::Video::disableVerticalSync || %newDeviceMode != $pref::Video::deviceMode) %newVsync != $pref::Video::enableVerticalSync || %newDeviceMode != $pref::Video::deviceMode)
{ {
//****Edge Case Hack //****Edge Case Hack
// If we're in fullscreen mode and switching to a different monitor at the // If we're in fullscreen mode and switching to a different monitor at the
@ -607,7 +607,7 @@ function updateDisplaySettings()
} }
$pref::Video::mode = %newMode; $pref::Video::mode = %newMode;
$pref::Video::disableVerticalSync = %newVsync; $pref::Video::enableVerticalSync = %newVsync;
$pref::Video::deviceId = %newDeviceID; $pref::Video::deviceId = %newDeviceID;
$pref::Video::deviceMode = %newDeviceMode; $pref::Video::deviceMode = %newDeviceMode;
$pref::Video::Resolution = %newRes; $pref::Video::Resolution = %newRes;

View file

@ -28,7 +28,7 @@ $sceneLighting::purgeMethod = "lastCreated";
$sceneLighting::cacheLighting = 1; $sceneLighting::cacheLighting = 1;
$pref::Video::displayDevice = ($platform $= "windows") ? "D3D11" : "OpenGL"; $pref::Video::displayDevice = ($platform $= "windows") ? "D3D11" : "OpenGL";
$pref::Video::disableVerticalSync = 1; $pref::Video::enableVerticalSync = 0;
$pref::Video::defaultFenceCount = 0; $pref::Video::defaultFenceCount = 0;
$pref::Video::screenShotSession = 0; $pref::Video::screenShotSession = 0;
$pref::Video::screenShotFormat = "PNG"; $pref::Video::screenShotFormat = "PNG";
@ -50,7 +50,7 @@ $pref::Video::disablePixSpecular = false;
$pref::Video::disableCubemapping = false; $pref::Video::disableCubemapping = false;
/// ///
$pref::Video::disableParallaxMapping = false; $pref::Video::enableParallaxMapping = true;
$pref::Video::Gamma = 2.2; $pref::Video::Gamma = 2.2;
$pref::Video::Contrast = 1.0; $pref::Video::Contrast = 1.0;
@ -137,7 +137,7 @@ $pref::Reflect::refractTexScale = 1.0;
$pref::Reflect::frameLimitMS = 10; $pref::Reflect::frameLimitMS = 10;
/// Set true to force all water objects to use static cubemap reflections. /// Set true to force all water objects to use static cubemap reflections.
$pref::Water::disableTrueReflections = false; $pref::Water::enableTrueReflections = true;
// A global LOD scalar which can reduce the overall density of placed GroundCover. // A global LOD scalar which can reduce the overall density of placed GroundCover.
$pref::GroundCover::densityScale = 1.0; $pref::GroundCover::densityScale = 1.0;

View file

@ -111,13 +111,13 @@ function GuiInspectorVariableGroup::buildRangeField(%this, %fieldName, %fieldLab
function guiInspectorRangeField::onResize(%this) function guiInspectorRangeField::onResize(%this)
{ {
echo("RESIIIIIIIIIIIZED");
} }
function guiInspectorRangeFieldText::onReturn(%this) function guiInspectorRangeFieldText::onReturn(%this)
{ {
%value = %this.getText(); %value = %this.getText();
%this.sliderControl.setValue(%value); %this.sliderControl.setValue(%value);
%this.sliderControl.onDragComplete();
} }
function guiInspectorRangeFieldSlider::onDragComplete( %this ) function guiInspectorRangeFieldSlider::onDragComplete( %this )
@ -142,3 +142,8 @@ function guiInspectorRangeFieldSlider::onDragComplete( %this )
eval(%setCommand); eval(%setCommand);
} }
function guiInspectorRangeFieldSlider::onMouseDragged(%this)
{
%this.onDragComplete();
}