diff --git a/Engine/source/T3D/Scene.cpp b/Engine/source/T3D/Scene.cpp index b08e59a8f..e2494743b 100644 --- a/Engine/source/T3D/Scene.cpp +++ b/Engine/source/T3D/Scene.cpp @@ -81,6 +81,12 @@ void Scene::onRemove() }*/ } +void Scene::onPostAdd() +{ + if (isMethod("onPostAdd")) + Con::executef(this, "onPostAdd"); +} + void Scene::addObject(SimObject* object) { //Child scene @@ -175,7 +181,7 @@ void Scene::unpackUpdate(NetConnection *conn, BitStream *stream) } // -Vector Scene::getObjectsByClass(String className) +Vector Scene::getObjectsByClass(String className, bool checkSubscenes) { return Vector(); } diff --git a/Engine/source/T3D/Scene.h b/Engine/source/T3D/Scene.h index 8d56ff7aa..f75d29ce9 100644 --- a/Engine/source/T3D/Scene.h +++ b/Engine/source/T3D/Scene.h @@ -50,6 +50,7 @@ public: virtual bool onAdd(); virtual void onRemove(); + virtual void onPostAdd(); virtual void interpolateTick(F32 delta); virtual void processTick(); @@ -67,7 +68,10 @@ public: void unpackUpdate(NetConnection *conn, BitStream *stream); // - Vector getObjectsByClass(String className); + Vector getObjectsByClass(String className, bool checkSubscenes); + + template + Vector getObjectsByClass(bool checkSubscenes); static Scene *getRootScene() { @@ -79,3 +83,42 @@ public: static Vector smSceneList; }; + + +template +Vector Scene::getObjectsByClass(bool checkSubscenes) +{ + Vector foundObjects; + + T* curObject; + + //first, check ourself + for (U32 i = 0; i < mPermanentObjects.size(); i++) + { + curObject = dynamic_cast(mPermanentObjects[i]); + if (curObject) + foundObjects.push_back(curObject); + } + + for (U32 i = 0; i < mDynamicObjects.size(); i++) + { + curObject = dynamic_cast(mDynamicObjects[i]); + if (curObject) + foundObjects.push_back(curObject); + } + + if (checkSubscenes) + { + for (U32 i = 0; i < mSubScenes.size(); i++) + { + Vector appendList = mSubScenes[i]->getObjectsByClass(true); + + for (U32 a = 0; a < appendList.size(); a++) + { + foundObjects.push_back(appendList[a]); + } + } + } + + return foundObjects; +} diff --git a/Engine/source/T3D/assets/LevelAsset.cpp b/Engine/source/T3D/assets/LevelAsset.cpp index 36b7d14cd..32e7175d2 100644 --- a/Engine/source/T3D/assets/LevelAsset.cpp +++ b/Engine/source/T3D/assets/LevelAsset.cpp @@ -88,6 +88,7 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false) mLevelFile = StringTable->EmptyString(); mPreviewImage = StringTable->EmptyString(); + mGamemodeName = StringTable->EmptyString(); mMainLevelAsset = StringTable->EmptyString(); } @@ -114,7 +115,7 @@ void LevelAsset::initPersistFields() addProtectedField("PreviewImage", TypeAssetLooseFilePath, Offset(mPreviewImage, LevelAsset), &setPreviewImageFile, &getPreviewImageFile, "Path to the image used for selection preview."); - addField("isSubScene", TypeString, Offset(mIsSubLevel, LevelAsset), "Is this a sublevel to another Scene"); + addField("isSubScene", TypeBool, Offset(mIsSubLevel, LevelAsset), "Is this a sublevel to another Scene"); addField("gameModeName", TypeString, Offset(mGamemodeName, LevelAsset), "Name of the Game Mode to be used with this level"); } diff --git a/Engine/source/T3D/assets/TerrainAsset.cpp b/Engine/source/T3D/assets/TerrainAsset.cpp new file mode 100644 index 000000000..b3e2a8a1c --- /dev/null +++ b/Engine/source/T3D/assets/TerrainAsset.cpp @@ -0,0 +1,290 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2013 GarageGames, LLC +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#ifndef TERRAINASSET_H +#include "TerrainAsset.h" +#endif + +#ifndef _ASSET_MANAGER_H_ +#include "assets/assetManager.h" +#endif + +#ifndef _CONSOLETYPES_H_ +#include "console/consoleTypes.h" +#endif + +#ifndef _TAML_ +#include "persistence/taml/taml.h" +#endif + +#ifndef _ASSET_PTR_H_ +#include "assets/assetPtr.h" +#endif + +//----------------------------------------------------------------------------- + +IMPLEMENT_CONOBJECT(TerrainAsset); + +ConsoleType(TerrainAssetPtr, TypeTerrainAssetPtr, TerrainAsset, ASSET_ID_FIELD_PREFIX) + +//----------------------------------------------------------------------------- + +ConsoleGetType(TypeTerrainAssetPtr) +{ + // Fetch asset Id. + return (*((AssetPtr*)dptr)).getAssetId(); +} + +//----------------------------------------------------------------------------- + +ConsoleSetType(TypeTerrainAssetPtr) +{ + // Was a single argument specified? + if (argc == 1) + { + // Yes, so fetch field value. + const char* pFieldValue = argv[0]; + + // Fetch asset pointer. + AssetPtr* pAssetPtr = dynamic_cast*>((AssetPtrBase*)(dptr)); + + // Is the asset pointer the correct type? + if (pAssetPtr == NULL) + { + // No, so fail. + //Con::warnf("(TypeMaterialAssetPtr) - Failed to set asset Id '%d'.", pFieldValue); + return; + } + + // Set asset. + pAssetPtr->setAssetId(pFieldValue); + + return; + } + + // Warn. + Con::warnf("(TypeTerrainAssetPtr) - Cannot set multiple args to a single asset."); +} + +//----------------------------------------------------------------------------- + +TerrainAsset::TerrainAsset() +{ + mTerrainFile = StringTable->EmptyString(); +} + +//----------------------------------------------------------------------------- + +TerrainAsset::~TerrainAsset() +{ +} + +//----------------------------------------------------------------------------- + +void TerrainAsset::initPersistFields() +{ + // Call parent. + Parent::initPersistFields(); + + //addField("shaderGraph", TypeRealString, Offset(mShaderGraphFile, TerrainAsset), ""); + addProtectedField("terrainFile", TypeAssetLooseFilePath, Offset(mTerrainFile, TerrainAsset), + &setTerrainFile, &getTerrainFile, "Path to the file containing the terrain data."); +} + +void TerrainAsset::initializeAsset() +{ + // Call parent. + Parent::initializeAsset(); + + if (!Platform::isFullPath(mTerrainFile)) + mTerrainFile = getOwned() ? expandAssetFilePath(mTerrainFile) : mTerrainFile; + + //if (Platform::isFile(mTerrainFile)) + // Con::executeFile(mScriptFile, false, false); +} + +void TerrainAsset::onAssetRefresh() +{ + mTerrainFile = expandAssetFilePath(mTerrainFile); + + //if (Platform::isFile(mScriptFile)) + // Con::executeFile(mScriptFile, false, false); +} + +void TerrainAsset::setTerrainFile(const char* pScriptFile) +{ + // Sanity! + AssertFatal(pScriptFile != NULL, "Cannot use a NULL script file."); + + // Fetch image file. + pScriptFile = StringTable->insert(pScriptFile); + + // Update. + mTerrainFile = getOwned() ? expandAssetFilePath(pScriptFile) : pScriptFile; + + // Refresh the asset. + refreshAsset(); +} + +//------------------------------------------------------------------------------ + +void TerrainAsset::copyTo(SimObject* object) +{ + // Call to parent. + Parent::copyTo(object); +} + +//----------------------------------------------------------------------------- +// GuiInspectorTypeAssetId +//----------------------------------------------------------------------------- + +IMPLEMENT_CONOBJECT(GuiInspectorTypeTerrainAssetPtr); + +ConsoleDocClass(GuiInspectorTypeTerrainAssetPtr, + "@brief Inspector field type for Material Asset Objects\n\n" + "Editor use only.\n\n" + "@internal" +); + +void GuiInspectorTypeTerrainAssetPtr::consoleInit() +{ + Parent::consoleInit(); + + ConsoleBaseType::getType(TypeTerrainAssetPtr)->setInspectorFieldType("GuiInspectorTypeTerrainAssetPtr"); +} + +GuiControl* GuiInspectorTypeTerrainAssetPtr::constructEditControl() +{ + // Create base filename edit controls + mUseHeightOverride = true; + mHeightOverride = 100; + + mMatEdContainer = new GuiControl(); + mMatEdContainer->registerObject(); + + addObject(mMatEdContainer); + + // Create "Open in ShapeEditor" button + mMatPreviewButton = new GuiBitmapButtonCtrl(); + + const char* matAssetId = getData(); + + TerrainAsset* matAsset = AssetDatabase.acquireAsset< TerrainAsset>(matAssetId); + + TerrainMaterial* materialDef = nullptr; + + char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; + + /*if (!Sim::findObject(matAsset->getMaterialDefinitionName(), materialDef)) + { + Con::errorf("GuiInspectorTypeTerrainAssetPtr::constructEditControl() - unable to find material in asset"); + } + else + { + mMatPreviewButton->setBitmap(materialDef->mDiffuseMapFilename[0]); + }*/ + + mMatPreviewButton->setPosition(0, 0); + mMatPreviewButton->setExtent(100,100); + + // Change filespec + char szBuffer[512]; + dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"TerrainAsset\", \"AssetBrowser.changeAsset\", %d, %s);", + mInspector->getComponentGroupTargetId(), mCaption); + mMatPreviewButton->setField("Command", szBuffer); + + mMatPreviewButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); + mMatPreviewButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); + mMatPreviewButton->setDataField(StringTable->insert("hovertime"), NULL, "1000"); + + StringBuilder strbld; + /*strbld.append(matAsset->getMaterialDefinitionName()); + strbld.append("\n"); + strbld.append("Open this file in the Material Editor");*/ + + mMatPreviewButton->setDataField(StringTable->insert("tooltip"), NULL, strbld.data()); + + _registerEditControl(mMatPreviewButton); + //mMatPreviewButton->registerObject(); + mMatEdContainer->addObject(mMatPreviewButton); + + mMatAssetIdTxt = new GuiTextEditCtrl(); + mMatAssetIdTxt->registerObject(); + mMatAssetIdTxt->setActive(false); + + mMatAssetIdTxt->setText(matAssetId); + + mMatAssetIdTxt->setBounds(100, 0, 150, 18); + mMatEdContainer->addObject(mMatAssetIdTxt); + + return mMatEdContainer; +} + +bool GuiInspectorTypeTerrainAssetPtr::updateRects() +{ + S32 dividerPos, dividerMargin; + mInspector->getDivider(dividerPos, dividerMargin); + Point2I fieldExtent = getExtent(); + Point2I fieldPos = getPosition(); + + mCaptionRect.set(0, 0, fieldExtent.x - dividerPos - dividerMargin, fieldExtent.y); + mEditCtrlRect.set(fieldExtent.x - dividerPos + dividerMargin, 1, dividerPos - dividerMargin - 34, fieldExtent.y); + + bool resized = mEdit->resize(mEditCtrlRect.point, mEditCtrlRect.extent); + + if (mMatEdContainer != nullptr) + { + mMatPreviewButton->resize(mEditCtrlRect.point, mEditCtrlRect.extent); + } + + if (mMatPreviewButton != nullptr) + { + mMatPreviewButton->resize(Point2I::Zero, Point2I(100, 100)); + } + + if (mMatAssetIdTxt != nullptr) + { + mMatAssetIdTxt->resize(Point2I(100, 0), Point2I(mEditCtrlRect.extent.x - 100, 18)); + } + + return resized; +} + +void GuiInspectorTypeTerrainAssetPtr::setMaterialAsset(String assetId) +{ + mTargetObject->setDataField(mCaption, "", assetId); + + //force a refresh + SimObject* obj = mInspector->getInspectObject(); + mInspector->inspectObject(obj); +} + +DefineEngineMethod(GuiInspectorTypeTerrainAssetPtr, setMaterialAsset, void, (String assetId), (""), + "Gets a particular shape animation asset for this shape.\n" + "@param animation asset index.\n" + "@return Shape Animation Asset.\n") +{ + if (assetId == String::EmptyString) + return; + + return object->setMaterialAsset(assetId); +} diff --git a/Engine/source/T3D/assets/TerrainAsset.h b/Engine/source/T3D/assets/TerrainAsset.h new file mode 100644 index 000000000..e8c2be59b --- /dev/null +++ b/Engine/source/T3D/assets/TerrainAsset.h @@ -0,0 +1,103 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2013 GarageGames, LLC +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- +#ifndef TERRAINASSET_H +#define TERRAINASSET_H + +#ifndef _ASSET_BASE_H_ +#include "assets/assetBase.h" +#endif + +#ifndef _ASSET_DEFINITION_H_ +#include "assets/assetDefinition.h" +#endif + +#ifndef _STRINGUNIT_H_ +#include "string/stringUnit.h" +#endif + +#ifndef _ASSET_FIELD_TYPES_H_ +#include "assets/assetFieldTypes.h" +#endif + +#ifndef _GFXDEVICE_H_ +#include "gfx/gfxDevice.h" +#endif + +#ifndef _GUI_INSPECTOR_TYPES_H_ +#include "gui/editor/guiInspectorTypes.h" +#endif + +#include "terrain/terrData.h" + +//----------------------------------------------------------------------------- +class TerrainAsset : public AssetBase +{ + typedef AssetBase Parent; + + StringTableEntry mTerrainFile; + +public: + TerrainAsset(); + virtual ~TerrainAsset(); + + /// Engine. + static void initPersistFields(); + virtual void copyTo(SimObject* object); + + void setTerrainFile(const char* pTerrainFile); + inline StringTableEntry getTerrainFile(void) const { return mTerrainFile; }; + + /// Declare Console Object. + DECLARE_CONOBJECT(TerrainAsset); + +protected: + virtual void initializeAsset(); + virtual void onAssetRefresh(void); + + static bool setTerrainFile(void *obj, const char *index, const char *data) { static_cast(obj)->setTerrainFile(data); return false; } + static const char* getTerrainFile(void* obj, const char* data) { return static_cast(obj)->getTerrainFile(); } +}; + +DefineConsoleType(TypeTerrainAssetPtr, TerrainAsset) + +//----------------------------------------------------------------------------- +// TypeAssetId GuiInspectorField Class +//----------------------------------------------------------------------------- +class GuiInspectorTypeTerrainAssetPtr : public GuiInspectorField +{ + typedef GuiInspectorField Parent; +public: + + GuiControl* mMatEdContainer; + GuiBitmapButtonCtrl *mMatPreviewButton; + GuiTextEditCtrl *mMatAssetIdTxt; + + DECLARE_CONOBJECT(GuiInspectorTypeTerrainAssetPtr); + static void consoleInit(); + + virtual GuiControl* constructEditControl(); + virtual bool updateRects(); + void setMaterialAsset(String assetId); +}; + +#endif // _ASSET_BASE_H_ + diff --git a/Engine/source/gfx/gfxTextureManager.cpp b/Engine/source/gfx/gfxTextureManager.cpp index 5b4654f6b..e289acd32 100644 --- a/Engine/source/gfx/gfxTextureManager.cpp +++ b/Engine/source/gfx/gfxTextureManager.cpp @@ -760,6 +760,12 @@ GFXTextureObject *GFXTextureManager::createTexture( U32 width, U32 height, GFXFo GFXFormat checkFmt = format; _validateTexParams( localWidth, localHeight, profile, numMips, checkFmt ); + //check to see if we've handled the mips just now, and if not, then handle them here + if (numMips == numMipLevels && (localWidth != width || localHeight != height)) + { + numMips = mFloor(mLog2(mMax(localWidth, localHeight))) + 1; + } + // AssertFatal( checkFmt == format, "Anonymous texture didn't get the format it wanted." ); GFXTextureObject *outTex = NULL; diff --git a/Engine/source/gui/editor/inspector/variableInspector.cpp b/Engine/source/gui/editor/inspector/variableInspector.cpp index 340de765e..ee78d49c9 100644 --- a/Engine/source/gui/editor/inspector/variableInspector.cpp +++ b/Engine/source/gui/editor/inspector/variableInspector.cpp @@ -116,6 +116,32 @@ void GuiVariableInspector::endGroup() mCurrentGroup = ""; } +void GuiVariableInspector::setGroupExpanded(const char* groupName, bool isExpanded) +{ + String name = groupName; + for (U32 g = 0; g < mGroups.size(); g++) + { + if (mGroups[g]->getGroupName() == name) + { + if (isExpanded) + mGroups[g]->expand(); + else + mGroups[g]->collapse(); + } + } +} + +void GuiVariableInspector::setGroupsExpanded(bool isExpanded) +{ + for (U32 g = 0; g < mGroups.size(); g++) + { + if (isExpanded) + mGroups[g]->expand(); + else + mGroups[g]->collapse(); + } +} + void GuiVariableInspector::addField(const char* name, const char* label, const char* typeName, const char* description, const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj) { @@ -227,6 +253,17 @@ DefineEngineMethod(GuiVariableInspector, endGroup, void, (),, "endGroup()") object->endGroup(); } +DefineEngineMethod(GuiVariableInspector, setGroupExpanded, void, (const char* groupName, bool isExpanded), ("", false), "setGroupExpanded()") +{ + object->setGroupExpanded(groupName, isExpanded); +} + +DefineEngineMethod(GuiVariableInspector, setGroupsExpanded, void, (bool isExpanded), (false), "setGroupsExpanded()") +{ + object->setGroupsExpanded(isExpanded); +} + + DefineEngineMethod(GuiVariableInspector, addField, void, (const char* name, const char* label, const char* typeName, const char* description, const char* defaultValue, const char* dataValues, SimObject* ownerObj), ("","","","","", "", nullAsType()), "addField( fieldName/varName, fieldLabel, fieldTypeName, description, defaultValue, defaultValues, ownerObject )") diff --git a/Engine/source/gui/editor/inspector/variableInspector.h b/Engine/source/gui/editor/inspector/variableInspector.h index 35a0c2681..2648567c6 100644 --- a/Engine/source/gui/editor/inspector/variableInspector.h +++ b/Engine/source/gui/editor/inspector/variableInspector.h @@ -51,6 +51,8 @@ public: void startGroup(const char* name); void endGroup(); + void setGroupExpanded(const char* groupName, bool isExpanded); + void setGroupsExpanded(bool isExpanded); void addField(const char* name, const char* label, const char* typeName, const char* description, const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj); @@ -71,4 +73,4 @@ protected: }; -#endif // _GUI_VARIABLEINSPECTOR_H_ \ No newline at end of file +#endif // _GUI_VARIABLEINSPECTOR_H_ diff --git a/Engine/source/lighting/shadowMap/lightShadowMap.cpp b/Engine/source/lighting/shadowMap/lightShadowMap.cpp index c59707519..2b0b72adb 100644 --- a/Engine/source/lighting/shadowMap/lightShadowMap.cpp +++ b/Engine/source/lighting/shadowMap/lightShadowMap.cpp @@ -595,7 +595,7 @@ ShadowMapParams::ShadowMapParams( LightInfo *light ) overDarkFactor.set(2000.0f, 1000.0f, 500.0f, 100.0f); numSplits = 4; logWeight = 0.91f; - texSize = 512; + texSize = 1024; shadowDistance = 400.0f; shadowSoftness = 0.15f; fadeStartDist = 0.0f; @@ -655,9 +655,9 @@ void ShadowMapParams::_validate() // based on the split count to keep the total // shadow texture size within 4096. if ( numSplits == 2 || numSplits == 4 ) - maxTexSize = 2048; + maxTexSize = 4096; if ( numSplits == 3 ) - maxTexSize = 1024; + maxTexSize = 2048; } else numSplits = 1; diff --git a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp index 698538938..c98487e91 100644 --- a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp @@ -827,6 +827,73 @@ Var* ShaderFeatureGLSL::addOutDetailTexCoord( Vector &compon return outTex; } +Var* ShaderFeatureGLSL::getSurface(Vector& componentList, MultiLine* meta, const MaterialFeatureData& fd) +{ + ShaderConnector* connectComp = dynamic_cast(componentList[C_CONNECTOR]); + + /*Var* diffuseColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget)); + + Var* matinfo = (Var*)LangElement::find("PBRConfig"); + if (!matinfo) + { + Var* metalness = (Var*)LangElement::find("metalness"); + if (!metalness) + { + metalness = new Var("metalness", "float"); + metalness->uniform = true; + metalness->constSortPos = cspPotentialPrimitive; + } + + Var* smoothness = (Var*)LangElement::find("smoothness"); + if (!smoothness) + { + smoothness = new Var("smoothness", "float"); + smoothness->uniform = true; + smoothness->constSortPos = cspPotentialPrimitive; + } + + matinfo = new Var("PBRConfig", "vec4"); + LangElement* colorDecl = new DecOp(matinfo); + meta->addStatement(new GenOp(" @ = vec4(0.0,1.0,@,@);\r\n", colorDecl, smoothness, metalness)); //reconstruct matinfo, no ao darkening + } + + Var* wsNormal = (Var*)LangElement::find("wsNormal"); + Var* normal = (Var*)LangElement::find("normal"); + if (!normal) + { + normal = new Var("normal", "vec3"); + meta->addStatement(new GenOp(" @;\r\n\n", new DecOp(normal))); + if (!fd.features[MFT_NormalMap]) + { + Var* worldToTangent = getInWorldToTangent(componentList); + meta->addStatement(new GenOp(" @ = normalize(tMul(@,vec3(0,0,1.0f)));\r\n\n", normal, worldToTangent)); + } + else + { + meta->addStatement(new GenOp(" @ = normalize( half3( @ ) );\r\n", normal, wsNormal)); + } + } + + Var* wsEyePos = (Var*)LangElement::find("eyePosWorld"); + Var* wsPosition = getInWsPosition(componentList); + Var* wsView = getWsView(wsPosition, meta); + + Var* surface = (Var*)LangElement::find("surface"); + + if (!surface) + { + surface = new Var("surface", "Surface"); + meta->addStatement(new GenOp(" @ = createForwardSurface(@,@,@,@,@,@);\r\n\n", new DecOp(surface), diffuseColor, normal, matinfo, + wsPosition, wsEyePos, wsView)); + }*/ + + Var* surface = (Var*)LangElement::find("surface"); + if (!surface) + { + surface = new Var("surface", "float"); + } + return surface; +} //**************************************************************************** // Base Texture //**************************************************************************** @@ -2060,33 +2127,13 @@ void RTLightingFeatGLSL::processPix( Vector &componentList, // TODO: We can totally detect for this in the material // feature setup... we should move it out of here! // - if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] ) + //if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] ) return; ShaderConnector *connectComp = dynamic_cast( componentList[C_CONNECTOR] ); MultiLine *meta = new MultiLine; - // Look for a wsNormal or grab it from the connector. - Var *wsNormal = (Var*)LangElement::find( "wsNormal" ); - if ( !wsNormal ) - { - wsNormal = connectComp->getElement( RT_TEXCOORD ); - wsNormal->setName( "wsNormal" ); - wsNormal->setStructName( "IN" ); - wsNormal->setType( "vec3" ); - - // If we loaded the normal its our responsibility - // to normalize it... the interpolators won't. - // - // Note we cast to half here to get partial precision - // optimized code which is an acceptable loss of - // precision for normals and performs much better - // on older Geforce cards. - // - meta->addStatement( new GenOp( " @ = normalize( half3( @ ) );\r\n", wsNormal, wsNormal ) ); - } - // Now the wsPosition and wsView. Var *wsPosition = getInWsPosition( componentList ); Var *wsView = getWsView( wsPosition, meta ); @@ -2106,12 +2153,13 @@ void RTLightingFeatGLSL::processPix( Vector &componentList, // Get all the light constants. Var *inLightPos = new Var( "inLightPos", "vec4" ); inLightPos->uniform = true; - inLightPos->arraySize = 3; + inLightPos->arraySize = 4; inLightPos->constSortPos = cspPotentialPrimitive; - Var *inLightInvRadiusSq = new Var( "inLightInvRadiusSq", "vec4" ); - inLightInvRadiusSq->uniform = true; - inLightInvRadiusSq->constSortPos = cspPotentialPrimitive; + Var * inLightConfigData = new Var( "inLightConfigData", "vec4" ); + inLightConfigData->uniform = true; + inLightConfigData->arraySize = 4; + inLightConfigData->constSortPos = cspPotentialPrimitive; Var *inLightColor = new Var( "inLightColor", "vec4" ); inLightColor->uniform = true; @@ -2120,56 +2168,54 @@ void RTLightingFeatGLSL::processPix( Vector &componentList, Var *inLightSpotDir = new Var( "inLightSpotDir", "vec4" ); inLightSpotDir->uniform = true; - inLightSpotDir->arraySize = 3; + inLightSpotDir->arraySize = 4; inLightSpotDir->constSortPos = cspPotentialPrimitive; - Var *inLightSpotAngle = new Var( "inLightSpotAngle", "vec4" ); - inLightSpotAngle->uniform = true; - inLightSpotAngle->constSortPos = cspPotentialPrimitive; + Var * lightSpotParams = new Var( "lightSpotParams", "vec4" ); + lightSpotParams->uniform = true; + lightSpotParams->arraySize = 4; + lightSpotParams->constSortPos = cspPotentialPrimitive; - Var *lightSpotFalloff = new Var( "inLightSpotFalloff", "vec4" ); - lightSpotFalloff->uniform = true; - lightSpotFalloff->constSortPos = cspPotentialPrimitive; + Var* hasVectorLight = new Var("hasVectorLight", "int"); + hasVectorLight->uniform = true; + hasVectorLight->constSortPos = cspPotentialPrimitive; - Var *smoothness = (Var*)LangElement::find("smoothness"); - if (!fd.features[MFT_SpecularMap]) + Var* vectorLightDirection = new Var("vectorLightDirection", "vec4"); + vectorLightDirection->uniform = true; + vectorLightDirection->constSortPos = cspPotentialPrimitive; + + Var* vectorLightColor = new Var("vectorLightColor", "vec4"); + vectorLightColor->uniform = true; + vectorLightColor->constSortPos = cspPotentialPrimitive; + + Var* vectorLightBrightness = new Var("vectorLightBrightness", "float"); + vectorLightBrightness->uniform = true; + vectorLightBrightness->constSortPos = cspPotentialPrimitive; + + Var* surface = getSurface(componentList, meta, fd); + if (!surface) { - if (!smoothness) - { - smoothness = new Var("smoothness", "float"); - smoothness->uniform = true; - smoothness->constSortPos = cspPotentialPrimitive; - } - } + Con::errorf("ShaderGen::RTLightingFeatGLSL() - failed to generate surface!"); + return; + } + Var *smoothness = (Var*)LangElement::find("smoothness"); Var *metalness = (Var*)LangElement::find("metalness"); - if (!fd.features[MFT_SpecularMap]) - { - if (!metalness) - { - metalness = new Var("metalness", "float"); - metalness->uniform = true; - metalness->constSortPos = cspPotentialPrimitive; - } - } - Var *albedo = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget)); + Var *curColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget)); Var *ambient = new Var( "ambient", "vec4" ); ambient->uniform = true; ambient->constSortPos = cspPass; + + Var* lighting = new Var("lighting", "vec4"); + meta->addStatement(new GenOp(" @ = compute4Lights( @, @, @, @,\r\n" + " @, @, @, @, @, @, @);\r\n", + new DecOp(lighting), surface, lightMask, inLightPos, inLightConfigData, inLightColor, inLightSpotDir, lightSpotParams, + hasVectorLight, vectorLightDirection, vectorLightColor, vectorLightBrightness)); - // Calculate the diffuse shading and specular powers. - meta->addStatement( new GenOp( " compute4Lights( @, @, @, @,\r\n" - " @, @, @, @, @, @, @, @, @,\r\n" - " @, @ );\r\n", - wsView, wsPosition, wsNormal, lightMask, - inLightPos, inLightInvRadiusSq, inLightColor, inLightSpotDir, inLightSpotAngle, lightSpotFalloff, smoothness, metalness, albedo, - rtShading, specular ) ); + meta->addStatement(new GenOp(" @.rgb += @.rgb;\r\n", curColor, lighting)); - // Apply the lighting to the diffuse color. - LangElement *lighting = new GenOp( "vec4( @.rgb + @.rgb, 1 )", rtShading, ambient ); - meta->addStatement( new GenOp( " @;\r\n", assignColor( lighting, Material::Mul ) ) ); output = meta; } @@ -2872,7 +2918,7 @@ void HardwareSkinningFeatureGLSL::processVert(Vector &componen } //**************************************************************************** -// ReflectionProbeFeatHLSL +// ReflectionProbeFeatGLSL //**************************************************************************** ReflectionProbeFeatGLSL::ReflectionProbeFeatGLSL() @@ -2880,6 +2926,17 @@ ReflectionProbeFeatGLSL::ReflectionProbeFeatGLSL() { addDependency(&mDep); } + +void ReflectionProbeFeatGLSL::processVert(Vector& componentList, + const MaterialFeatureData& fd) +{ + //MultiLine* meta = new MultiLine; + //output = meta; + // Also output the worldToTanget transform which + // we use to create the world space normal. + //getOutWorldToTangent(componentList, meta, fd); +} + void ReflectionProbeFeatGLSL::processPix(Vector& componentList, const MaterialFeatureData& fd) { @@ -2889,7 +2946,7 @@ void ReflectionProbeFeatGLSL::processPix(Vector& componentList // TODO: We can totally detect for this in the material // feature setup... we should move it out of here! // - if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit]) + //if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit]) return; ShaderConnector * connectComp = dynamic_cast(componentList[C_CONNECTOR]); @@ -2897,15 +2954,13 @@ void ReflectionProbeFeatGLSL::processPix(Vector& componentList MultiLine * meta = new MultiLine; // Now the wsPosition and wsView. - Var * wsPosition = getInWsPosition(componentList); - Var * wsView = getWsView(wsPosition, meta); - - Var * albedo = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget)); - + Var *wsPosition = getInWsPosition(componentList); + Var *wsView = getWsView(wsPosition, meta); + //Reflection Probe WIP U32 MAX_FORWARD_PROBES = 4; - Var * numProbes = new Var("numProbes", "float"); + Var * numProbes = new Var("numProbes", "int"); numProbes->uniform = true; numProbes->constSortPos = cspPotentialPrimitive; @@ -2913,9 +2968,9 @@ void ReflectionProbeFeatGLSL::processPix(Vector& componentList cubeMips->uniform = true; cubeMips->constSortPos = cspPotentialPrimitive; - Var * hasSkylight = new Var("hasSkylight", "float"); - hasSkylight->uniform = true; - hasSkylight->constSortPos = cspPotentialPrimitive; + Var * skylightCubemapIdx = new Var("skylightCubemapIdx", "float"); + skylightCubemapIdx->uniform = true; + skylightCubemapIdx->constSortPos = cspPotentialPrimitive; Var * inProbePosArray = new Var("inProbePosArray", "vec4"); inProbePosArray->arraySize = MAX_FORWARD_PROBES; @@ -2942,7 +2997,7 @@ void ReflectionProbeFeatGLSL::processPix(Vector& componentList probeConfigData->uniform = true; probeConfigData->constSortPos = cspPotentialPrimitive; - Var * worldToObjArray = new Var("worldToObjArray", "mat4x4"); + Var * worldToObjArray = new Var("worldToObjArray", "mat4"); worldToObjArray->arraySize = MAX_FORWARD_PROBES; worldToObjArray->uniform = true; worldToObjArray->constSortPos = cspPotentialPrimitive; @@ -2965,87 +3020,29 @@ void ReflectionProbeFeatGLSL::processPix(Vector& componentList irradianceCubemapAR->sampler = true; irradianceCubemapAR->constNum = Var::getTexUnitNum(); - Var * skylightSpecularMap = new Var("skylightSpecularMap", "samplerCube"); - skylightSpecularMap->uniform = true; - skylightSpecularMap->sampler = true; - skylightSpecularMap->constNum = Var::getTexUnitNum(); + Var* surface = getSurface(componentList, meta, fd); - Var * skylightIrradMap = new Var("skylightIrradMap", "samplerCube"); - skylightIrradMap->uniform = true; - skylightIrradMap->sampler = true; - skylightIrradMap->constNum = Var::getTexUnitNum(); - - - Var * inTex = getInTexCoord("texCoord", "vec2", componentList); - if (!inTex) + if (!surface) + { + Con::errorf("ShaderGen::ReflectionProbeFeatGLSL() - failed to generate surface!"); return; - - Var * diffuseColor = (Var*)LangElement::find("diffuseColor"); - if (!diffuseColor) - { - diffuseColor = new Var; - diffuseColor->setType("vec4"); - diffuseColor->setName("diffuseColor"); - LangElement* colorDecl = new DecOp(diffuseColor); - meta->addStatement(new GenOp(" @ = vec4(1.0,1.0,1.0,1.0);\r\n", colorDecl)); //default to flat white } - Var* matinfo = (Var*)LangElement::find("PBRConfig"); - if (!matinfo) - { - Var* metalness = (Var*)LangElement::find("metalness"); - if (!metalness) - { - metalness = new Var("metalness", "float"); - metalness->uniform = true; - metalness->constSortPos = cspPotentialPrimitive; - } - - Var* smoothness = (Var*)LangElement::find("smoothness"); - if (!smoothness) - { - smoothness = new Var("smoothness", "float"); - smoothness->uniform = true; - smoothness->constSortPos = cspPotentialPrimitive; - } - - matinfo = new Var("PBRConfig", "vec4"); - LangElement* colorDecl = new DecOp(matinfo); - meta->addStatement(new GenOp(" @ = vec4(0.0,1.0,@,@);\r\n", colorDecl, smoothness, metalness)); //reconstruct matinfo, no ao darkening - } - - Var* bumpNormal = (Var*)LangElement::find("bumpNormal"); - if (!bumpNormal) - { - bumpNormal = new Var("bumpNormal", "vec4"); - LangElement* colorDecl = new DecOp(bumpNormal); - meta->addStatement(new GenOp(" @ = vec4(1.0,0.0,0.0,0.0);\r\n", colorDecl)); //default to identity normal - } + Var *curColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget)); + Var *matinfo = (Var*)LangElement::find("PBRConfig"); + Var* metalness = (Var*)LangElement::find("metalness"); + Var* smoothness = (Var*)LangElement::find("smoothness"); + Var* wsEyePos = (Var*)LangElement::find("eyePosWorld"); - Var* worldToCamera = (Var*)LangElement::find("worldToCamera"); - if (!worldToCamera) - { - worldToCamera = new Var; - worldToCamera->setType("mat4x4"); - worldToCamera->setName("worldToCamera"); - worldToCamera->uniform = true; - worldToCamera->constSortPos = cspPass; - } - //Reflection vec - Var* surface = new Var("surface", "Surface"); - meta->addStatement(new GenOp(" @ = createForwardSurface(@,@,@,@,@,@,@,@);\r\n\n", new DecOp(surface), diffuseColor, bumpNormal, matinfo, - inTex, wsPosition, wsEyePos, wsView, worldToCamera)); - String computeForwardProbes = String(" @.rgb += computeForwardProbes(@,@,@,@,@,@,@,@,@,\r\n\t\t"); + String computeForwardProbes = String(" @.rgb = computeForwardProbes(@,@,@,@,@,@,@,@,@,\r\n\t\t"); computeForwardProbes += String("@,@,\r\n\t\t"); - computeForwardProbes += String("@, @, \r\n\t\t"); computeForwardProbes += String("@,@).rgb; \r\n"); - meta->addStatement(new GenOp(computeForwardProbes.c_str(), albedo, surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, refBoxMinArray, refBoxMaxArray, inRefPosArray, - hasSkylight, BRDFTexture, - skylightIrradMap, skylightSpecularMap, + meta->addStatement(new GenOp(computeForwardProbes.c_str(), curColor, surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, refBoxMinArray, refBoxMaxArray, inRefPosArray, + skylightCubemapIdx, BRDFTexture, irradianceCubemapAR, specularCubemapAR)); output = meta; @@ -3055,8 +3052,8 @@ ShaderFeature::Resources ReflectionProbeFeatGLSL::getResources(const MaterialFea { Resources res; - res.numTex = 5; - res.numTexReg = 5; + res.numTex = 3; + res.numTexReg = 3; return res; } @@ -3075,9 +3072,5 @@ void ReflectionProbeFeatGLSL::setTexData(Material::StageData& stageDat, passData.mTexType[texIndex++] = Material::SGCube; passData.mSamplerNames[texIndex] = "irradianceCubemapAR"; passData.mTexType[texIndex++] = Material::SGCube; - passData.mSamplerNames[texIndex] = "skylightSpecularMap"; - passData.mTexType[texIndex++] = Material::SGCube; - passData.mSamplerNames[texIndex] = "skylightIrradMap"; - passData.mTexType[texIndex++] = Material::SGCube; } } diff --git a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.h b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.h index 264e3682b..96b7be731 100644 --- a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.h +++ b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.h @@ -134,6 +134,8 @@ public: Var* getInvWorldView( Vector &componentList, bool useInstancing, MultiLine *meta ); + + Var* getSurface(Vector& componentList, MultiLine* meta, const MaterialFeatureData& fd); // ShaderFeature Var* getVertTexCoord( const String &name ); @@ -678,6 +680,9 @@ protected: public: ReflectionProbeFeatGLSL(); + + virtual void processVert(Vector& componentList, + const MaterialFeatureData& fd); virtual void processPix(Vector& componentList, const MaterialFeatureData& fd); diff --git a/Engine/source/ts/tsMesh.cpp b/Engine/source/ts/tsMesh.cpp index ddf81bfbd..9053a1184 100644 --- a/Engine/source/ts/tsMesh.cpp +++ b/Engine/source/ts/tsMesh.cpp @@ -86,7 +86,7 @@ bool TSMesh::smUseEncodedNormals = false; const F32 TSMesh::VISIBILITY_EPSILON = 0.0001f; -S32 TSMesh::smMaxInstancingVerts = 200; +S32 TSMesh::smMaxInstancingVerts = 2000; MatrixF TSMesh::smDummyNodeTransform(1); // quick function to force object to face camera -- currently throws out roll :( @@ -3473,4 +3473,4 @@ void TSSkinMesh::printVerts() bw._indexes.x, bw._indexes.y, bw._indexes.z, bw._indexes.w, bw._weights.x, bw._weights.y, bw._weights.z, bw._weights.w); } -} \ No newline at end of file +} diff --git a/Engine/source/ts/tsShapeInstance.cpp b/Engine/source/ts/tsShapeInstance.cpp index 7be0cd151..d6889c2fe 100644 --- a/Engine/source/ts/tsShapeInstance.cpp +++ b/Engine/source/ts/tsShapeInstance.cpp @@ -73,7 +73,7 @@ MODULE_BEGIN( TSShapeInstance ) Con::addVariable("$pref::TS::maxInstancingVerts", TypeS32, &TSMesh::smMaxInstancingVerts, "@brief Enables mesh instancing on non-skin meshes that have less that this count of verts.\n" - "The default value is 200. Higher values can degrade performance.\n" + "The default value is 2000. Higher values can degrade performance.\n" "@ingroup Rendering\n" ); } diff --git a/Templates/BaseGame/game/core/Core.cs b/Templates/BaseGame/game/core/Core.cs index f55128a46..57389f9b4 100644 --- a/Templates/BaseGame/game/core/Core.cs +++ b/Templates/BaseGame/game/core/Core.cs @@ -16,6 +16,9 @@ function CoreModule::onCreate(%this) // to find exactly which subsystems should be readied before kicking things off. // ---------------------------------------------------------------------------- + new Settings(ProjectSettings) { file = "core/settings.xml"; }; + ProjectSettings.read(); + ModuleDatabase.LoadExplicit( "Core_Rendering" ); ModuleDatabase.LoadExplicit( "Core_Utility" ); ModuleDatabase.LoadExplicit( "Core_GUI" ); @@ -25,9 +28,6 @@ function CoreModule::onCreate(%this) ModuleDatabase.LoadExplicit( "Core_Components" ); ModuleDatabase.LoadExplicit( "Core_GameObjects" ); - new Settings(ProjectSettings) { file = "core/settings.xml"; }; - ProjectSettings.read(); - %prefPath = getPrefpath(); if ( isFile( %prefPath @ "/clientPrefs.cs" ) ) exec( %prefPath @ "/clientPrefs.cs" ); diff --git a/Templates/BaseGame/game/core/clientServer/scripts/client/levelDownload.cs b/Templates/BaseGame/game/core/clientServer/scripts/client/levelDownload.cs index e3229b93e..58f02c92f 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/client/levelDownload.cs +++ b/Templates/BaseGame/game/core/clientServer/scripts/client/levelDownload.cs @@ -54,6 +54,7 @@ function clientCmdMissionStartPhase1(%seq, %missionName) if ( isScriptFile( %path ) ) { postFXManager::loadPresetHandler( %path ); + $PostFXManager::currentPreset = %path; } else { @@ -138,6 +139,18 @@ function sceneLightingComplete() echo("Mission lighting done"); $lightingMission = false; + //Bake probes + %boxProbeIds = parseMissionGroupForIds("BoxEnvironmentProbe", ""); + %sphereProbeIds = parseMissionGroupForIds("SphereEnvironmentProbe", ""); + %skylightIds = parseMissionGroupForIds("Skylight", ""); + + %probeIds = rtrim(ltrim(%boxProbeIds SPC %sphereProbeIds)); + %probeIds = rtrim(ltrim(%probeIds SPC %skylightIds)); + %probeCount = getWordCount(%probeIds); + + $pref::ReflectionProbes::CurrentLevelPath = filePath($Client::MissionFile) @ "/" @ fileBase($Client::MissionFile) @ "/probes/"; + ProbeBin.processProbes(); + onPhaseComplete("STARTING MISSION"); // The is also the end of the mission load cycle. diff --git a/Templates/BaseGame/game/core/gui/scripts/canvas.cs b/Templates/BaseGame/game/core/gui/scripts/canvas.cs index b38cdccca..50263f53d 100644 --- a/Templates/BaseGame/game/core/gui/scripts/canvas.cs +++ b/Templates/BaseGame/game/core/gui/scripts/canvas.cs @@ -147,7 +147,7 @@ function configureCanvas() "--Refresh Rate : " @ %rate NL "--AA TypeXLevel : " @ %aa NL "--------------"); - + // Actually set the new video mode Canvas.setVideoMode(%resX, %resY, %fs, %bpp, %rate, %aa); diff --git a/Templates/BaseGame/game/core/postFX/Core_PostFX.cs b/Templates/BaseGame/game/core/postFX/Core_PostFX.cs index d36d912ab..232b16e4b 100644 --- a/Templates/BaseGame/game/core/postFX/Core_PostFX.cs +++ b/Templates/BaseGame/game/core/postFX/Core_PostFX.cs @@ -2,9 +2,10 @@ function Core_PostFX::onCreate(%this) { // + exec("./scripts/postFxManager.cs"); exec("./scripts/postFx.cs"); - /*exec("./scripts/postFxManager.gui.cs"); - exec("./scripts/postFxManager.gui.settings.cs"); + + /*exec("./scripts/postFxManager.gui.settings.cs"); exec("./scripts/postFxManager.persistance.cs"); exec("./scripts/default.postfxpreset.cs"); diff --git a/Templates/BaseGame/game/core/postFX/guis/postFxManager.gui b/Templates/BaseGame/game/core/postFX/guis/postFxManager.gui deleted file mode 100644 index 6a704eb65..000000000 --- a/Templates/BaseGame/game/core/postFX/guis/postFxManager.gui +++ /dev/null @@ -1,2755 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiControl(PostFXManager) { - position = "0 0"; - extent = "1024 768"; - minExtent = "8 8"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiModelessDialogProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "1"; - - new DbgFileView() { - position = "0 0"; - extent = "8 2"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiWindowCtrl(ppOptionsWindow) { - text = "PostFX Manager"; - resizeWidth = "0"; - resizeHeight = "0"; - canMove = "1"; - canClose = "1"; - canMinimize = "0"; - canMaximize = "0"; - canCollapse = "0"; - closeCommand = "Canvas.popDialog(PostFXManager);"; - edgeSnap = "0"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "306 216"; - extent = "411 336"; - minExtent = "8 8"; - horizSizing = "center"; - vertSizing = "center"; - profile = "GuiWindowProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapBorderCtrl() { - position = "11 77"; - extent = "390 216"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBorderProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTabBookCtrl(ppOptionsTabBook) { - tabPosition = "Top"; - tabMargin = "7"; - minTabWidth = "32"; - tabHeight = "20"; - allowReorder = "0"; - defaultPage = "-1"; - selectedPage = "1"; - frontTabPadding = "0"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "11 58"; - extent = "394 233"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBookProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTabPageCtrl(ppOptionsSSAOTab) { - fitBook = "0"; - text = "SSAO"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "394 213"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Options for the Screen Space Ambient Occlusion postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapBorderCtrl() { - position = "12 30"; - extent = "365 170"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBorderProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "1"; - }; - new GuiTabBookCtrl(ppOptionsSSAOOptions) { - tabPosition = "Top"; - tabMargin = "7"; - minTabWidth = "64"; - tabHeight = "20"; - allowReorder = "0"; - defaultPage = "-1"; - selectedPage = "2"; - frontTabPadding = "0"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "12 11"; - extent = "362 185"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBookProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTabPageCtrl(ppOptionsSSAOGeneralTab) { - fitBook = "0"; - text = "General"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "362 165"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains general overall settings for the SSAO postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTextCtrl(ppOptionsSSAOOverallStrengthLabel) { - text = "Overall Strength"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "31 57"; - extent = "77 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the overall strength of the Ambient Occlusion effect."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAOBlurDepthLabel) { - text = "Blur (Softness)"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "38 85"; - extent = "73 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the amount of softness in the SSAO, overall."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAOBlurNormalLabel) { - text = "Blur (Normal Maps)"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "19 112"; - extent = "92 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the amount of softness in the SSAO, in the normal maps."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl(ppOptionsSSAOQuality) { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - text = "Low"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "120 28"; - extent = "211 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiPopUpMenuProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAOQualityLabel) { - text = "Quality"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "76 29"; - extent = "32 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOOverallStrength) { - range = "0 50"; - ticks = "1000"; - snap = "0"; - value = "2"; - position = "120 56"; - extent = "211 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOBlurDepth) { - range = "0 0.3"; - ticks = "1000"; - snap = "0"; - value = "0.001"; - position = "120 86"; - extent = "211 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOBlurNormal) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0.95"; - position = "119 113"; - extent = "212 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsSSAONearTab) { - fitBook = "0"; - text = "Near"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "362 165"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains settings for the near range ambient occlusion aspect of the SSAO postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiSliderCtrl(ppOptionsSSAONearRadius) { - range = "0.001 5"; - ticks = "1000"; - snap = "0"; - value = "0.1"; - position = "122 17"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAONearDepthMin) { - range = "0 5"; - ticks = "1000"; - snap = "0"; - value = "0.1"; - position = "122 62"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAONearStrength) { - range = "0 20"; - ticks = "1000"; - snap = "0"; - value = "6"; - position = "122 39"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAONearRadiusLabel) { - text = "Radius"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "80 16"; - extent = "34 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the near/small radius SSAO reach."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAONearStrengthLabel) { - text = "Strength"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "73 38"; - extent = "41 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the near/small radius SSAO strength."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAONearDepthMinLabel) { - text = "Depth Min"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "66 61"; - extent = "48 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the near/small radius SSAO minimum depth value."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAONearDepthMaxLabel) { - text = "Depth Max"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "62 85"; - extent = "52 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the near/small radius SSAO maximum depth value."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAONearDepthMax) { - range = "0 50"; - ticks = "1000"; - snap = "0"; - value = "1"; - position = "122 86"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAONearToleranceNormal) { - range = "0 2"; - ticks = "1000"; - snap = "0"; - value = "0"; - position = "122 133"; - extent = "103 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAONearTolerancePower) { - range = "0 2"; - ticks = "1000"; - snap = "0"; - value = "1"; - position = "246 133"; - extent = "97 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAONearToleranceLabel2) { - text = "Tolerance / Power"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "24 132"; - extent = "92 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAONearToleranceLabel1) { - text = "Normal Maps : "; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "19 113"; - extent = "71 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsSSAOFarTab) { - fitBook = "0"; - text = "Far"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "362 165"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains settings for the far range ambient occlusion aspect of the SSAO postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTextCtrl(ppOptionsSSAOFarRadiusLabel) { - text = "Radius"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "80 16"; - extent = "34 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the far/large radius SSAO reach."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOFarRadius) { - range = "0.001 5"; - ticks = "1000"; - snap = "0"; - value = "1"; - position = "122 17"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAOFarStrengthLabel) { - text = "Strength"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "73 38"; - extent = "41 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the far/large radius SSAO strength."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOFarStrength) { - range = "0 20"; - ticks = "1000"; - snap = "0"; - value = "10"; - position = "122 39"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAOFarDepthMinLabel) { - text = "Depth Min"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "66 61"; - extent = "48 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the far/large radius SSAO minimum depth."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOFarDepthMin) { - range = "0 5"; - ticks = "1000"; - snap = "0"; - value = "0.2"; - position = "122 62"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAOFarDepthMaxLabel) { - text = "Depth Max"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "62 85"; - extent = "52 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the far/large radius SSAO maximum."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOFarDepthMax) { - range = "0 5"; - ticks = "1000"; - snap = "0"; - value = "2"; - position = "122 86"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsSSAOFarToleranceLabel1) { - text = "Normal Maps :"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 113"; - extent = "72 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Tolerance / Power"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "24 132"; - extent = "90 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOFarToleranceNormal) { - range = "0 2"; - ticks = "1000"; - snap = "0"; - value = "0"; - position = "122 133"; - extent = "100 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsSSAOFarTolerancePower) { - range = "0 2"; - ticks = "1000"; - snap = "0"; - value = "2"; - position = "239 133"; - extent = "104 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - }; - new GuiCheckBoxCtrl(ppOptionsEnableSSAO) { - useInactiveState = "0"; - text = "Enable"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "329 7"; - extent = "53 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enable/Disable the SSAO postFX"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsHDRTab) { - fitBook = "0"; - text = "HDR"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "394 213"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Options for the High Definition Range Lighting postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapBorderCtrl() { - position = "12 30"; - extent = "363 172"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBorderProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "1"; - }; - new GuiTabBookCtrl(ppOptionsHDROptions) { - tabPosition = "Top"; - tabMargin = "7"; - minTabWidth = "64"; - tabHeight = "20"; - allowReorder = "0"; - defaultPage = "-1"; - selectedPage = "0"; - frontTabPadding = "0"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "12 11"; - extent = "365 195"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBookProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTabPageCtrl(ppOptionsHDRBrightnessTab) { - fitBook = "0"; - text = "Brightness"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "365 175"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains settings related to the brightness of the HDR postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiSliderCtrl(ppOptionsHDRMinLuminance) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0"; - position = "132 77"; - extent = "206 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Value : 0"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsHDRKeyValue) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0.0459184"; - position = "132 50"; - extent = "206 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Value : 0.0459184"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRKeyValueLabel) { - text = "Key Value"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "69 50"; - extent = "52 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The tone mapping middle grey or exposure value used to adjust the overall \"balance\" of the image."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRMinLuminanceLabel) { - text = "Minimum Luminance"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "25 77"; - extent = "96 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The minimum luminance value to allow when tone mapping the scene. This is particularly useful if your scene is very dark or has a black ambient color in places."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRWhiteCutoffLabel) { - text = "White Cutoff"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 104"; - extent = "65 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The cutoff level for the white levels in the brightness."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsHDRWhiteCutoff) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0.52551"; - position = "132 104"; - extent = "206 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Value : 0.52551"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsHDRBrightnessAdaptRate) { - range = "0.1 10"; - ticks = "1000"; - snap = "0"; - value = "2"; - position = "132 132"; - extent = "205 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRBrightnessAdaptRateLabel) { - text = "Brightness Adapt Rate"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "12 132"; - extent = "109 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The speed at which the view adjusts to the new lighting in the environment."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRKeyValueLabel1) { - text = "Tone Mapping Contrast"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "10 24"; - extent = "111 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Tone mapping contrast is the amount of scene to blend, with the tone mapped HDR scene. Lower values are recommended but higher values give a strong contrasted darker shadowed look."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsHDRToneMappingAmount) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0.265306"; - position = "132 24"; - extent = "206 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "value : 0.265306"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsHDRBloomTab) { - fitBook = "0"; - text = "Bloom"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "365 175"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains settings related to the blooming aspect of the HDR postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiSliderCtrl(ppOptionsHDRBloomBlurMultiplier) { - range = "0 5"; - ticks = "1000"; - snap = "0"; - value = "0.502645"; - position = "132 70"; - extent = "199 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Value : 0.502645"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsHDRBloomBlurMean) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0.510526"; - position = "132 97"; - extent = "200 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Value : 0.510526"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsHDRBloomBlurStdDev) { - range = "0 3"; - ticks = "1000"; - snap = "0"; - value = "1.4127"; - position = "132 123"; - extent = "199 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Value : 1.4127"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRBlurMultiplierLabel) { - text = "Blur Multiplier"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "59 70"; - extent = "63 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The amount of blur to apply to the bloomed areas in the HDR."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRBlurMeanLabel) { - text = "Blur \"mean\" value"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "38 97"; - extent = "84 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRBlurStandardDevianceLabel) { - text = "Blur \"Std Dev\" value"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "23 123"; - extent = "99 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsHDRBloomBrightPassThresholdLabel) { - text = "Bright pass threshold"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "19 43"; - extent = "103 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The bright pass threshold controls how bright the brightest areas of the scene are in the HDR."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsHDRBloomBlurBrightPassThreshold) { - range = "0 5"; - ticks = "1000"; - snap = "0"; - value = "1.60526"; - position = "132 43"; - extent = "200 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Value : 1.60526"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiCheckBoxCtrl(ppOptionsHDRBloom) { - useInactiveState = "0"; - text = " Enable Bloom"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "250 9"; - extent = "85 24"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enables or disables the bloom (glowing effect) of the HDR PostFX."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsHDRBloomEffectsTab) { - fitBook = "0"; - text = "Effects"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "365 175"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains settings related to the effects the HDR postFX can offer"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiCheckBoxCtrl(ppOptionsHDREffectsBlueShift) { - useInactiveState = "0"; - text = " Enable Color Shift"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "11 4"; - extent = "117 24"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enables a scene tinting/Blue shift based on the color selected below."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiColorPickerCtrl(ppOptionsHDREffectsBlueShiftColorBlend) { - baseColor = "1 0 0.0235294 1"; - pickColor = "0 0 0 1"; - selectorGap = "1"; - displayMode = "BlendColor"; - actionOnMove = "1"; - showReticle = "1"; - position = "10 29"; - extent = "344 110"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Select a color"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiColorPickerCtrl(ppOptionsHDREffectsBlueShiftColorBaseColor) { - baseColor = "1 0 0.0235294 1"; - pickColor = "0 0 0 1"; - selectorGap = "1"; - displayMode = "HorizColor"; - actionOnMove = "1"; - showReticle = "1"; - position = "10 142"; - extent = "343 21"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Select a color"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - }; - new GuiCheckBoxCtrl(ppOptionsHDRToneMapping) { - useInactiveState = "0"; - text = " Enable Tone Mapping"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "18 8"; - extent = "120 24"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enables or disabled tone mapping on the HDR. The tone mapping balanced the brightness levels during the HDR process. Recommended"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiCheckBoxCtrl(ppOptionsEnableHDR) { - useInactiveState = "0"; - text = "Enable"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "329 7"; - extent = "53 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enable/Disable the HDR postFX (takes some time to initialise, be patient)"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiCheckBoxCtrl(ppOptionsEnableHDRDebug) { - useInactiveState = "0"; - text = "Debug"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "262 7"; - extent = "53 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsLightRaysTab) { - fitBook = "0"; - text = "Light Rays"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "394 213"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Options for the Light Rays postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiSliderCtrl(ppOptionsLightRaysBrightScalar) { - range = "0 5"; - ticks = "1000"; - snap = "0"; - value = "0.75"; - position = "96 46"; - extent = "264 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsLightRaysBrightnessScalarLabel) { - text = "Brightness"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "26 48"; - extent = "87 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls how bright the rays and the object casting them are in the scene."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - new GuiSliderCtrl(ppOptionsLightRaysSampleScalar) { - range = "20 512"; - ticks = "512"; - snap = "0"; - value = "40"; - position = "96 75"; - extent = "264 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - new GuiTextCtrl(ppOptionsLightRaysSampleScalarLabel) { - text = "Samples"; - maxLength = "512"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "26 76"; - extent = "87 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the number of samples for the shader."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - new GuiSliderCtrl(ppOptionsLightRaysDensityScalar) { - range = "0.01 1"; - ticks = "1000"; - snap = "0"; - value = "0.94"; - position = "96 105"; - extent = "264 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - new GuiTextCtrl(ppOptionsLightRaysDensityScalarLabel) { - text = "Density"; - maxLength = "1000"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "26 106"; - extent = "87 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the density of the rays."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - new GuiSliderCtrl(ppOptionsLightRaysWeightScalar) { - range = "0.1 10"; - ticks = "1000"; - snap = "0"; - value = "5.65"; - position = "96 135"; - extent = "264 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - new GuiTextCtrl(ppOptionsLightRaysWeightScalarLabel) { - text = "Weight"; - maxLength = "1000"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "26 136"; - extent = "87 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the weight of the rays."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - - new GuiSliderCtrl(ppOptionsLightRaysDecayScalar) { - range = "0.01 1"; - ticks = "1000"; - snap = "0"; - value = "1.0"; - position = "96 165"; - extent = "264 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - - new GuiTextCtrl(ppOptionsLightRaysDecayScalarLabel) { - text = "Decay"; - maxLength = "1000"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "26 166"; - extent = "87 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the decay of the rays."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiCheckBoxCtrl(ppOptionsEnableLightRays) { - useInactiveState = "0"; - text = "Enable"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "329 7"; - extent = "53 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enable/Disable the light rays postFX"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsDOFTab) { - fitBook = "0"; - text = "DOF"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "394 213"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Options for the Depth Of Field postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapBorderCtrl() { - position = "14 28"; - extent = "362 170"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBorderProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "1"; - }; - new GuiTabBookCtrl() { - tabPosition = "Top"; - tabMargin = "7"; - minTabWidth = "64"; - tabHeight = "20"; - allowReorder = "0"; - defaultPage = "-1"; - selectedPage = "1"; - frontTabPadding = "0"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "14 9"; - extent = "360 189"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabBookProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTabPageCtrl(ppOptionsDOFGeneralTab) { - fitBook = "0"; - text = "General"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "360 169"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "0"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains general settings related to the DOF system"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - //new GuiCheckBoxCtrl(ppOptionsDOFEnableDOF) { - //useInactiveState = "0"; - //text = "Enable DOF"; - //groupNum = "-1"; - //buttonType = "ToggleButton"; - //useMouseEvents = "0"; - //position = "31 43"; - //extent = "140 30"; - //minExtent = "8 2"; - //horizSizing = "right"; - //vertSizing = "bottom"; - //profile = "GuiCheckBoxProfile"; - //visible = "1"; - //active = "1"; - //tooltipProfile = "GuiToolTipProfile"; - //hovertime = "1000"; - //isContainer = "0"; - //canSave = "1"; - //canSaveDynamicFields = "0"; - //}; - new GuiCheckBoxCtrl(ppOptionsDOFEnableAutoFocus) { - useInactiveState = "0"; - text = "Enable Auto Focus"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "31 8"; - extent = "140 30"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsDOFAutoFocusTab) { - fitBook = "0"; - text = "Auto Focus"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 20"; - extent = "360 169"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Contains settings related to the fine control of the auto focus system"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTextCtrl(ppOptionsDOFNearBlurMaxLabel) { - text = "Near Blur Max"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "36 8"; - extent = "67 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The max allowed value of near blur"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsDOFFarBlurMinSlider) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0"; - position = "120 8"; - extent = "224 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsDOFFarBlurMaxLabel) { - text = "Far Blur Max"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "43 34"; - extent = "60 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The max allowed value of far blur"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsDOFFarBlurMaxSlider) { - range = "0 1"; - ticks = "1000"; - snap = "0"; - value = "0"; - position = "120 34"; - extent = "224 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsDOFFocusRangeMinLabel) { - text = "Focus Range (Min)"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "13 61"; - extent = "90 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The distance range around the focal distance that remains in focus (in meters, minimum distance in focus) focal distance it is\r\ndependant on the visible distance set in your level"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsDOFFocusRangeMinSlider) { - range = "0.01 1e+003"; - ticks = "1000"; - snap = "0"; - value = "0.01"; - position = "120 61"; - extent = "224 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsDOFFocusRangeMaxLabel) { - text = "Focus Range (Max)"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "9 88"; - extent = "95 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The distance range around the focal distance that remains in focus (in meters, maximum distance in focus) focal distance it is\r\ndependant on the visible distance set in your level"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsDOFFocusRangeMaxSlider) { - range = "0.01 1e+003"; - ticks = "1000"; - snap = "0"; - value = "0.01"; - position = "119 87"; - extent = "224 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsDOFBurCurveNearLabel) { - text = "Blur Curve Near"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "27 114"; - extent = "77 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "A small number causes bluriness to increase gradually\r\nat distances closer than the focal distance. A large number causes bluriness to \r\nincrease quickly"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsDOFBlurCurveNearSlider) { - range = "0 50"; - ticks = "1000"; - snap = "0"; - value = "0"; - position = "119 114"; - extent = "225 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsDOFBlurCurveFarLabel) { - text = "Blur Curve Far"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "33 139"; - extent = "70 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "A small number causes bluriness to increase gradually\r\nat distances closer than the focal distance. A large number causes bluriness to \r\nincrease quickly"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsDOFBlurCurveFarSlider) { - range = "0 50"; - ticks = "1000"; - snap = "0"; - value = "0"; - position = "119 141"; - extent = "224 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - }; - new GuiCheckBoxCtrl(ppOptionsEnableDOF) { - useInactiveState = "0"; - text = "Enable"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "329 7"; - extent = "53 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enable/Disable the Depth of field postFX"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl(ppOptionsVignetteTab) { - fitBook = "0"; - text = "Vignette"; - maxLength = "1024"; - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "1"; - anchorLeft = "1"; - anchorRight = "1"; - position = "0 40"; - extent = "394 193"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Options for the Vignette postFX"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - Enabled = "1"; - - new GuiCheckBoxCtrl(ppOptionsEnableVignette) { - text = "Enable"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "329 7"; - extent = "53 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enable/Disable the vignette postFX"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(ppOptionsVignetteVMax) { - range = "0.001 5"; - ticks = "1000"; - snap = "0"; - value = "0.6"; - position = "96 46"; - extent = "221 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderBoxProfile"; - visible = "1"; - active = "1"; - variable = "$VignettePostEffect::VMax"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsVignetteVMaxLabel) { - text = "Radius"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "26 48"; - extent = "41 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Controls the maximum exposure of vignetting."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiTabPageCtrl() { - fitBook = "0"; - text = "Color Correction"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "8 27"; - extent = "376 200"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTabPageProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "ColorCorrectionTab"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTextCtrl() { - text = "Color Correction Ramp"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 7"; - extent = "118 13"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - text = "core/postFX/images/null_color_ramp.png"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 29"; - extent = "365 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextEditProfile"; - visible = "1"; - active = "1"; - altCommand = "ppColorCorrection_selectFileHandler( $thisControl.getText() );"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "ColorCorrectionFileName"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Select..."; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "252 54"; - extent = "56 22"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; - visible = "1"; - active = "1"; - command = "ppColorCorrection_selectFile();"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "ColorCorrectionButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Reset"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "315 54"; - extent = "56 22"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; - visible = "1"; - active = "1"; - command = "ppColorCorrection_selectFileHandler( \"\" );"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "ColorCorrectionReset"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - }; - new GuiButtonCtrl(ppOptionsApply) { - text = "Apply"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "309 302"; - extent = "93 23"; - minExtent = "8 8"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; - visible = "1"; - active = "1"; - command = "PostFXManager.settingsApplyAll(); Canvas.popDialog(PostFXManager);"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Apply the settings and close this dialog"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl(ppOptionsSavePreset) { - text = "Save Preset..."; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "111 302"; - extent = "93 23"; - minExtent = "8 8"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; - visible = "1"; - active = "1"; - command = "PostFXManager.savePresetFile();"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Save the preset to a file to disk for later use (use postfx::applyPreset)"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl(ppOptionsLoadPreset) { - text = "Load Preset..."; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "12 302"; - extent = "93 23"; - minExtent = "8 8"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; - visible = "1"; - active = "1"; - command = "PostFXManager.loadPresetFile();"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Load a post FX preset file from disk"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiCheckBoxCtrl(ppOptionsEnable) { - useInactiveState = "0"; - text = "Enable PostFX System"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "13 24"; - extent = "127 30"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Enable or Disable the postFX system"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl(ppOptionsQuality) { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "278 30"; - extent = "122 21"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiPopUpMenuProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Used to adjust the quality/performance settings of the PostFX system. Some PostFX may not adhere to the settings in this dialog."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl(ppOptionsQualityLabel) { - text = "Quality"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "238 32"; - extent = "39 12"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Used to adjust the quality/performance settings of the PostFX system. Some PostFX may not adhere to the settings in this dialog."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl(ppOptionsOk1) { - text = "Revert"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "210 302"; - extent = "93 23"; - minExtent = "8 8"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; - visible = "1"; - active = "1"; - command = "postProcessOptionsDlg.applySettings(); Canvas.popDialog(postProcessOptionsDlg);"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Revert any changes made since opening the dialog"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/core/postFX/scripts/hdr.cs b/Templates/BaseGame/game/core/postFX/scripts/hdr.cs index b5ee40f03..99afc2256 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/hdr.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/hdr.cs @@ -323,6 +323,80 @@ function HDRPostFX::onDisabled( %this ) resetLightManager(); } +function HDRPostFX::onAdd( %this ) +{ + PostFXManager.registerPostEffect(%this); + + //HDR should really be on at all times + %this.enable(); + + $HDRPostFX::enableToneMapping = 1; +} + +//This is used to populate the PostFXEditor's settings so the post FX can be edited +//This is automatically polled for any postFX that has been registered(in our onAdd) and the settings +//are thus exposed for editing +function HDRPostFX::populatePostFXSettings(%this) +{ + PostEffectEditorInspector.startGroup("HDR - General"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::keyValue", "Key Value", "float", "", $HDRPostFX::keyValue, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::minLuminace", "Minimum Luminance", "float", "", $HDRPostFX::minLuminace, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::whiteCutoff", "White Cutoff", "float", "", $HDRPostFX::whiteCutoff, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::adaptRate", "Brightness Adapt Rate", "float", "", $HDRPostFX::adaptRate, ""); + PostEffectEditorInspector.endGroup(); + + PostEffectEditorInspector.startGroup("HDR - Bloom"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::enableBloom", "Enable Bloom", "bool", "", $HDRPostFX::enableBloom, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::brightPassThreshold", "Bright Pass Threshold", "float", "", $HDRPostFX::brightPassThreshold, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::gaussMultiplier", "Blur Multiplier", "float", "", $HDRPostFX::gaussMultiplier, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::gaussMean", "Blur \"Mean\" Value", "float", "", $HDRPostFX::gaussMean, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::gaussStdDev", "Blur \"Std. Dev\" Value", "float", "", $HDRPostFX::gaussStdDev, ""); + PostEffectEditorInspector.endGroup(); + + PostEffectEditorInspector.startGroup("HDR - Effects"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::enableBlueShift", "Enable Blue Shift", "bool", "", $HDRPostFX::enableBlueShift, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::HDR::blueShiftColor", "Blue Shift Color", "colorF", "", $HDRPostFX::blueShiftColor, ""); + PostEffectEditorInspector.endGroup(); +} + +//This function pair(applyFromPreset and settingsApply) are done the way they are, with the separated variables +//so that we can effectively store the 'settings' away from the live variables that the postFX's actually utilize +//when rendering. This allows us to modify things but still leave room for reverting or temporarily applying them +function HDRPostFX::applyFromPreset(%this) +{ + //HDRPostFX Settings + $HDRPostFX::adaptRate = $PostFXManager::Settings::HDR::adaptRate; + $HDRPostFX::blueShiftColor = $PostFXManager::Settings::HDR::blueShiftColor; + $HDRPostFX::brightPassThreshold = $PostFXManager::Settings::HDR::brightPassThreshold; + $HDRPostFX::enableBloom = $PostFXManager::Settings::HDR::enableBloom; + $HDRPostFX::enableBlueShift = $PostFXManager::Settings::HDR::enableBlueShift; + $HDRPostFX::enableToneMapping = $PostFXManager::Settings::HDR::enableToneMapping; + $HDRPostFX::gaussMean = $PostFXManager::Settings::HDR::gaussMean; + $HDRPostFX::gaussMultiplier = $PostFXManager::Settings::HDR::gaussMultiplier; + $HDRPostFX::gaussStdDev = $PostFXManager::Settings::HDR::gaussStdDev; + $HDRPostFX::keyValue = $PostFXManager::Settings::HDR::keyValue; + $HDRPostFX::minLuminace = $PostFXManager::Settings::HDR::minLuminace; + $HDRPostFX::whiteCutoff = $PostFXManager::Settings::HDR::whiteCutoff; + $HDRPostFX::colorCorrectionRamp = $PostFXManager::Settings::ColorCorrectionRamp; +} + +function HDRPostFX::settingsApply(%this) +{ + $PostFXManager::Settings::HDR::adaptRate = $HDRPostFX::adaptRate; + $PostFXManager::Settings::HDR::blueShiftColor = $HDRPostFX::blueShiftColor; + $PostFXManager::Settings::HDR::brightPassThreshold = $HDRPostFX::brightPassThreshold; + $PostFXManager::Settings::HDR::enableBloom = $HDRPostFX::enableBloom; + $PostFXManager::Settings::HDR::enableBlueShift = $HDRPostFX::enableBlueShift; + $PostFXManager::Settings::HDR::enableToneMapping = $HDRPostFX::enableToneMapping; + $PostFXManager::Settings::HDR::gaussMean = $HDRPostFX::gaussMean; + $PostFXManager::Settings::HDR::gaussMultiplier = $HDRPostFX::gaussMultiplier; + $PostFXManager::Settings::HDR::gaussStdDev = $HDRPostFX::gaussStdDev; + $PostFXManager::Settings::HDR::keyValue = $HDRPostFX::keyValue; + $PostFXManager::Settings::HDR::minLuminace = $HDRPostFX::minLuminace; + $PostFXManager::Settings::HDR::whiteCutoff = $HDRPostFX::whiteCutoff; + $PostFXManager::Settings::ColorCorrectionRamp = $HDRPostFX::colorCorrectionRamp; +} + singleton PostEffect( HDRPostFX ) { isEnabled = false; diff --git a/Templates/BaseGame/game/core/postFX/scripts/lightRay.cs b/Templates/BaseGame/game/core/postFX/scripts/lightRay.cs index 523b9bdea..8f414bfd0 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/lightRay.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/lightRay.cs @@ -29,6 +29,10 @@ $LightRayPostFX::decay = 1.0; $LightRayPostFX::exposure = 0.0005; $LightRayPostFX::resolutionScale = 1.0; +function LightRayPostFX::onAdd( %this ) +{ + PostFXManager.registerPostEffect(%this); +} singleton ShaderData( LightRayOccludeShader ) { @@ -67,7 +71,7 @@ singleton GFXStateBlockData( LightRayStateBlock : PFX_DefaultStateBlock ) singleton PostEffect( LightRayPostFX ) { - isEnabled = false; + //isEnabled = false; allowReflectPass = false; renderTime = "PFXBeforeBin"; @@ -108,3 +112,43 @@ function LightRayPostFX::setShaderConsts( %this ) %pfx.setShaderConst( "$decay", $LightRayPostFX::decay ); %pfx.setShaderConst( "$exposure", $LightRayPostFX::exposure ); } + +function LightRayPostFX::populatePostFXSettings(%this) +{ + PostEffectEditorInspector.startGroup("Light Ray"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::EnableLightRays", "Enabled", "bool", "", $PostFXManager::PostFX::EnableLightRays, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::LightRays::brightScalar", "Brightness", "float", "", $LightRayPostFX::brightScalar, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::LightRays::numSamples", "Samples", "float", "", $LightRayPostFX::numSamples, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::LightRays::density", "Density", "float", "", $LightRayPostFX::density, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::LightRays::weight", "Weight", "float", "", $LightRayPostFX::weight, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::LightRays::decay", "Decay", "float", "", $LightRayPostFX::decay, ""); + PostEffectEditorInspector.endGroup(); +} + +function LightRayPostFX::applyFromPreset(%this) +{ + //Light rays settings + $PostFXManager::PostFX::EnableLightRays = $PostFXManager::Settings::EnableLightRays; + $LightRayPostFX::brightScalar = $PostFXManager::Settings::LightRays::brightScalar; + + $LightRayPostFX::numSamples = $PostFXManager::Settings::LightRays::numSamples; + $LightRayPostFX::density = $PostFXManager::Settings::LightRays::density; + $LightRayPostFX::weight = $PostFXManager::Settings::LightRays::weight; + $LightRayPostFX::decay = $PostFXManager::Settings::LightRays::decay; + + if($PostFXManager::PostFX::EnableLightRays) + %this.enable(); + else + %this.disable(); +} + +function LightRayPostFX::settingsApply(%this) +{ + $PostFXManager::Settings::EnableLightRays = $PostFXManager::PostFX::EnableLightRays; + $PostFXManager::Settings::LightRays::brightScalar = $LightRayPostFX::brightScalar; + + $PostFXManager::Settings::LightRays::numSamples = $LightRayPostFX::numSamples; + $PostFXManager::Settings::LightRays::density = $LightRayPostFX::density; + $PostFXManager::Settings::LightRays::weight = $LightRayPostFX::weight; + $PostFXManager::Settings::LightRays::decay = $LightRayPostFX::decay; +} \ No newline at end of file diff --git a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.persistance.cs b/Templates/BaseGame/game/core/postFX/scripts/postFxManager.cs similarity index 65% rename from Templates/BaseGame/game/core/postFX/scripts/postFxManager.persistance.cs rename to Templates/BaseGame/game/core/postFX/scripts/postFxManager.cs index 31fec95f1..dadfafaaa 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.persistance.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/postFxManager.cs @@ -20,6 +20,24 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- +$PostFXManager::vebose = true; +function postVerbose(%string) +{ + if($PostFXManager::vebose == true) + { + echo(%string); + } +} + +if(!isObject(PostFXManager)) +{ + new ArrayObject(PostFXManager){}; +} + +function PostFXManager::registerPostEffect(%this, %postEffect) +{ + PostFXManager.add(%postEffect); +} // Used to name the saved files. $PostFXManager::fileExtension = ".postfxpreset.cs"; @@ -30,6 +48,10 @@ $PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset.cs"; // Enable / disable PostFX when loading presets or just apply the settings? $PostFXManager::forceEnableFromPresets = true; +$PostFXManager::defaultPreset = "./default.postfxpreset.cs"; + +$PostFXManager::currentPreset = ""; + //Load a preset file from the disk, and apply the settings to the //controls. If bApplySettings is true - the actual values in the engine //will be changed to reflect the settings from the file. @@ -37,6 +59,7 @@ function PostFXManager::loadPresetFile() { //Show the dialog and set the flag getLoadFilename($PostFXManager::fileFilter, "PostFXManager::loadPresetHandler"); + $PostFXManager::currentPreset = $Tools::FileDialogs::LastFilePath(); } function PostFXManager::loadPresetHandler( %filename ) @@ -48,7 +71,16 @@ function PostFXManager::loadPresetHandler( %filename ) postVerbose("% - PostFX Manager - Executing " @ %filename); exec(%filename); - PostFXManager.settingsApplyFromPreset(); + %count = PostFXManager.Count(); + for(%i=0; %i < %count; %i++) + { + %postEffect = PostFXManager.getKey(%i); + + if(isObject(%postEffect) && %postEffect.isMethod("applyFromPreset")) + { + %postEffect.applyFromPreset(); + } + } } } @@ -69,11 +101,39 @@ function PostFXManager::savePresetHandler( %filename ) if(strStr(%filename, ".") == -1) %filename = %filename @ $PostFXManager::fileExtension; - //Apply the current settings to the preset - PostFXManager.settingsApplyAll(); + %count = PostFXManager.Count(); + for(%i=0; %i < %count; %i++) + { + %postEffect = PostFXManager.getKey(%i); + + if(isObject(%postEffect) && %postEffect.isMethod("settingsApply")) + { + %postEffect.settingsApply(); + } + } export("$PostFXManager::Settings::*", %filename, false); postVerbose("% - PostFX Manager - Save complete. Preset saved at : " @ %filename); } +function PostFXManager::settingsApplyDefaultPreset(%this) +{ + PostFXManager::loadPresetHandler($PostFXManager::defaultPreset); + $PostFXManager::currentPreset = $PostFXManager::defaultPreset; +} + +function PostFXManager::settingsEffectSetEnabled(%this, %postEffect, %bEnable) +{ + // Apply the change + if ( %bEnable == true ) + { + %postEffect.enable(); + postVerbose("% - PostFX Manager - " @ %postEffect.getName() @ " enabled"); + } + else + { + %postEffect.disable(); + postVerbose("% - PostFX Manager - " @ %postEffect.getName() @ " disabled"); + } +} \ No newline at end of file diff --git a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.gui.cs b/Templates/BaseGame/game/core/postFX/scripts/postFxManager.gui.cs deleted file mode 100644 index a6b0f0f01..000000000 --- a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.gui.cs +++ /dev/null @@ -1,446 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2012 GarageGames, LLC -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -$PostFXManager::vebose = true; -function postVerbose(%string) -{ - if($PostFXManager::vebose == true) - { - echo(%string); - } -} - -function PostFXManager::onDialogPush( %this ) -{ - //Apply the settings to the controls - postVerbose("% - PostFX Manager - Loading GUI."); - - %this.settingsRefreshAll(); -} - -// :: Controls for the overall postFX manager dialog -function ppOptionsEnable::onAction(%this) -{ - //Disable / Enable all PostFX - - if(ppOptionsEnable.getValue()) - { - %toEnable = true; - } - else - { - %toEnable = false; - } - - PostFXManager.settingsSetEnabled(%toEnable); - -} - -function PostFXManager::getEnableResultFromControl(%this, %control) -{ - %toEnable = -1; - %bTest = %control.getValue(); - if(%bTest == 1) - { - %toEnable = true; - } - else - { - %toEnable = false; - } - - return %toEnable; -} - -function ppOptionsEnableSSAO::onAction(%this) -{ - %toEnable = PostFXManager.getEnableResultFromControl(%this); - PostFXManager.settingsEffectSetEnabled("SSAO", %toEnable); -} - -function ppOptionsEnableHDR::onAction(%this) -{ - %toEnable = PostFXManager.getEnableResultFromControl(%this); - PostFXManager.settingsEffectSetEnabled("HDR", %toEnable); -} - -function ppOptionsEnableLightRays::onAction(%this) -{ - %toEnable = PostFXManager.getEnableResultFromControl(%this); - PostFXManager.settingsEffectSetEnabled("LightRays", %toEnable); -} - -function ppOptionsEnableDOF::onAction(%this) -{ - %toEnable = PostFXManager.getEnableResultFromControl(%this); - PostFXManager.settingsEffectSetEnabled("DOF", %toEnable); -} - -function ppOptionsEnableVignette::onAction(%this) -{ - %toEnable = PostFXManager.getEnableResultFromControl(%this); - PostFXManager.settingsEffectSetEnabled("Vignette", %toEnable); -} - -function ppOptionsSavePreset::onClick(%this) -{ - //Stores the current settings into a preset file for loading and use later on -} - -function ppOptionsLoadPreset::onClick(%this) -{ - //Loads and applies the settings from a postfxpreset file -} - - -//Other controls, Quality dropdown -function ppOptionsSSAOQuality::onSelect( %this, %id, %text ) -{ - if(%id > -1 && %id < 3) - { - $SSAOPostFx::quality = %id; - } -} - -//SSAO Slider controls -//General Tab -function ppOptionsSSAOOverallStrength::onMouseDragged(%this) -{ - $SSAOPostFx::overallStrength = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsSSAOBlurDepth::onMouseDragged(%this) -{ - $SSAOPostFx::blurDepthTol = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsSSAOBlurNormal::onMouseDragged(%this) -{ - $SSAOPostFx::blurNormalTol = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -//Near Tab -function ppOptionsSSAONearRadius::onMouseDragged(%this) -{ - $SSAOPostFx::sRadius = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsSSAONearStrength::onMouseDragged(%this) -{ - $SSAOPostFx::sStrength = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsSSAONearDepthMin::onMouseDragged(%this) -{ - $SSAOPostFx::sDepthMin = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsSSAONearDepthMax::onMouseDragged(%this) -{ - $SSAOPostFx::sDepthMax = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsSSAONearToleranceNormal::onMouseDragged(%this) -{ - $SSAOPostFx::sNormalTol = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsSSAONearTolerancePower::onMouseDragged(%this) -{ - $SSAOPostFx::sNormalPow = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -//Far Tab -function ppOptionsSSAOFarRadius::onMouseDragged(%this) -{ - $SSAOPostFx::lRadius = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -function ppOptionsSSAOFarStrength::onMouseDragged(%this) -{ - $SSAOPostFx::lStrength = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -function ppOptionsSSAOFarDepthMin::onMouseDragged(%this) -{ - $SSAOPostFx::lDepthMin = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -function ppOptionsSSAOFarDepthMax::onMouseDragged(%this) -{ - $SSAOPostFx::lDepthMax = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -function ppOptionsSSAOFarToleranceNormal::onMouseDragged(%this) -{ - $SSAOPostFx::lNormalTol = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -function ppOptionsSSAOFarTolerancePower::onMouseDragged(%this) -{ - $SSAOPostFx::lNormalPow = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -//HDR Slider Controls -//Brighness tab - -function ppOptionsHDRToneMappingAmount::onMouseDragged(%this) -{ - - $HDRPostFX::enableToneMapping = %this.value; - %this.ToolTip = "value : " @ %this.value; -} - -function ppOptionsHDRKeyValue::onMouseDragged(%this) -{ - $HDRPostFX::keyValue = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsHDRMinLuminance::onMouseDragged(%this) -{ - $HDRPostFX::minLuminace = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsHDRWhiteCutoff::onMouseDragged(%this) -{ - $HDRPostFX::whiteCutoff = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsHDRBrightnessAdaptRate::onMouseDragged(%this) -{ - $HDRPostFX::adaptRate = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -//Blur tab -function ppOptionsHDRBloomBlurBrightPassThreshold::onMouseDragged(%this) -{ - $HDRPostFX::brightPassThreshold = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsHDRBloomBlurMultiplier::onMouseDragged(%this) -{ - $HDRPostFX::gaussMultiplier = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsHDRBloomBlurMean::onMouseDragged(%this) -{ - $HDRPostFX::gaussMean = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsHDRBloomBlurStdDev::onMouseDragged(%this) -{ - $HDRPostFX::gaussStdDev = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - -function ppOptionsHDRBloom::onAction(%this) -{ - $HDRPostFX::enableBloom = %this.getValue(); -} - -function ppOptionsHDRToneMapping::onAction(%this) -{ - //$HDRPostFX::enableToneMapping = %this.getValue(); -} - -function ppOptionsHDREffectsBlueShift::onAction(%this) -{ - $HDRPostFX::enableBlueShift = %this.getValue(); -} - - -//Controls for color range in blue Shift dialog - -function ppOptionsHDREffectsBlueShiftColorBlend::onAction(%this) -{ - $HDRPostFX::blueShiftColor = %this.PickColor; - %this.ToolTip = "Color Values : " @ %this.PickColor; -} - -function ppOptionsHDREffectsBlueShiftColorBaseColor::onAction(%this) -{ - //This one feeds the one above - ppOptionsHDREffectsBlueShiftColorBlend.baseColor = %this.PickColor; - %this.ToolTip = "Color Values : " @ %this.PickColor; -} - - -//Light rays Brightness Slider Controls -function ppOptionsLightRaysBrightScalar::onMouseDragged(%this) -{ - $LightRayPostFX::brightScalar = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -//Light rays Number of Samples Slider Control -function ppOptionsLightRaysSampleScalar::onMouseDragged(%this) -{ - $LightRayPostFX::numSamples = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -//Light rays Density Slider Control -function ppOptionsLightRaysDensityScalar::onMouseDragged(%this) -{ - $LightRayPostFX::density = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -//Light rays Weight Slider Control -function ppOptionsLightRaysWeightScalar::onMouseDragged(%this) -{ - $LightRayPostFX::weight = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} -//Light rays Decay Slider Control -function ppOptionsLightRaysDecayScalar::onMouseDragged(%this) -{ - $LightRayPostFX::decay = %this.value; - %this.ToolTip = "Value : " @ %this.value; -} - - -function ppOptionsUpdateDOFSettings() -{ - DOFPostEffect.setFocusParams( $DOFPostFx::BlurMin, $DOFPostFx::BlurMax, $DOFPostFx::FocusRangeMin, $DOFPostFx::FocusRangeMax, -($DOFPostFx::BlurCurveNear), $DOFPostFx::BlurCurveFar ); - - DOFPostEffect.setAutoFocus( $DOFPostFx::EnableAutoFocus ); - DOFPostEffect.setFocalDist(0); - - if($PostFXManager::PostFX::EnableDOF) - { - DOFPostEffect.enable(); - } - else - { - DOFPostEffect.disable(); - } -} - -//DOF General Tab -//DOF Toggles -function ppOptionsDOFEnableDOF::onAction(%this) -{ - $PostFXManager::PostFX::EnableDOF = %this.getValue(); - ppOptionsUpdateDOFSettings(); -} - - -function ppOptionsDOFEnableAutoFocus::onAction(%this) -{ - $DOFPostFx::EnableAutoFocus = %this.getValue(); - DOFPostEffect.setAutoFocus( %this.getValue() ); -} - -//DOF AutoFocus Slider controls -function ppOptionsDOFFarBlurMinSlider::onMouseDragged(%this) -{ - $DOFPostFx::BlurMin = %this.value; - ppOptionsUpdateDOFSettings(); -} - -function ppOptionsDOFFarBlurMaxSlider::onMouseDragged(%this) -{ - $DOFPostFx::BlurMax = %this.value; - ppOptionsUpdateDOFSettings(); -} - -function ppOptionsDOFFocusRangeMinSlider::onMouseDragged(%this) -{ - $DOFPostFx::FocusRangeMin = %this.value; - ppOptionsUpdateDOFSettings(); -} - -function ppOptionsDOFFocusRangeMaxSlider::onMouseDragged(%this) -{ - $DOFPostFx::FocusRangeMax = %this.value; - ppOptionsUpdateDOFSettings(); -} - -function ppOptionsDOFBlurCurveNearSlider::onMouseDragged(%this) -{ - $DOFPostFx::BlurCurveNear = %this.value; - ppOptionsUpdateDOFSettings(); -} - -function ppOptionsDOFBlurCurveFarSlider::onMouseDragged(%this) -{ - $DOFPostFx::BlurCurveFar = %this.value; - ppOptionsUpdateDOFSettings(); -} - -function ppOptionsEnableHDRDebug::onAction(%this) -{ - if ( %this.getValue() ) - LuminanceVisPostFX.enable(); - else - LuminanceVisPostFX.disable(); -} - -function ppOptionsUpdateVignetteSettings() -{ - if($PostFXManager::PostFX::EnableVignette) - { - VignettePostEffect.enable(); - } - else - { - VignettePostEffect.disable(); - } -} - -function ppOptionsVignetteEnableVignette::onAction(%this) -{ - $PostFXManager::PostFX::EnableVignette = %this.getValue(); - ppOptionsUpdateVignetteSettings(); -} - -function ppColorCorrection_selectFile() -{ - %filter = "Image Files (*.png, *.jpg, *.dds, *.bmp, *.gif, *.jng. *.tga)|*.png;*.jpg;*.dds;*.bmp;*.gif;*.jng;*.tga|All Files (*.*)|*.*|"; - getLoadFilename( %filter, "ppColorCorrection_selectFileHandler"); -} - -function ppColorCorrection_selectFileHandler( %filename ) -{ - if ( %filename $= "" || !isFile( %filename ) ) - %filename = "core/postFX/images/null_color_ramp.png"; - else - %filename = makeRelativePath( %filename, getMainDotCsDir() ); - - $HDRPostFX::colorCorrectionRamp = %filename; - PostFXManager-->ColorCorrectionFileName.Text = %filename; -} \ No newline at end of file diff --git a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.gui.settings.cs b/Templates/BaseGame/game/core/postFX/scripts/postFxManager.gui.settings.cs deleted file mode 100644 index eefcd9b7e..000000000 --- a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.gui.settings.cs +++ /dev/null @@ -1,439 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2012 GarageGames, LLC -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -$PostFXManager::defaultPreset = "./default.postfxpreset.cs"; - -function PostFXManager::settingsSetEnabled(%this, %bEnablePostFX) -{ - $PostFXManager::PostFX::Enabled = %bEnablePostFX; - - //if to enable the postFX, apply the ones that are enabled - if ( %bEnablePostFX ) - { - //SSAO, HDR, LightRays, DOF - - if ( $PostFXManager::PostFX::EnableSSAO ) - SSAOPostFx.enable(); - else - SSAOPostFx.disable(); - - if ( $PostFXManager::PostFX::EnableHDR ) - HDRPostFX.enable(); - else - HDRPostFX.disable(); - - if ( $PostFXManager::PostFX::EnableLightRays ) - LightRayPostFX.enable(); - else - LightRayPostFX.disable(); - - if ( $PostFXManager::PostFX::EnableDOF ) - DOFPostEffect.enable(); - else - DOFPostEffect.disable(); - - if ( $PostFXManager::PostFX::EnableVignette ) - VignettePostEffect.enable(); - else - VignettePostEffect.disable(); - - postVerbose("% - PostFX Manager - PostFX enabled"); - } - else - { - //Disable all postFX - - SSAOPostFx.disable(); - HDRPostFX.disable(); - LightRayPostFX.disable(); - DOFPostEffect.disable(); - VignettePostEffect.disable(); - - postVerbose("% - PostFX Manager - PostFX disabled"); - } - - VolFogGlowPostFx.disable(); -} - -function PostFXManager::settingsEffectSetEnabled(%this, %sName, %bEnable) -{ - %postEffect = 0; - - //Determine the postFX to enable, and apply the boolean - if(%sName $= "SSAO") - { - %postEffect = SSAOPostFx; - $PostFXManager::PostFX::EnableSSAO = %bEnable; - //$pref::PostFX::SSAO::Enabled = %bEnable; - } - else if(%sName $= "HDR") - { - %postEffect = HDRPostFX; - $PostFXManager::PostFX::EnableHDR = %bEnable; - //$pref::PostFX::HDR::Enabled = %bEnable; - } - else if(%sName $= "LightRays") - { - %postEffect = LightRayPostFX; - $PostFXManager::PostFX::EnableLightRays = %bEnable; - //$pref::PostFX::LightRays::Enabled = %bEnable; - } - else if(%sName $= "DOF") - { - %postEffect = DOFPostEffect; - $PostFXManager::PostFX::EnableDOF = %bEnable; - //$pref::PostFX::DOF::Enabled = %bEnable; - } - else if(%sName $= "Vignette") - { - %postEffect = VignettePostEffect; - $PostFXManager::PostFX::EnableVignette = %bEnable; - //$pref::PostFX::Vignette::Enabled = %bEnable; - } - - // Apply the change - if ( %bEnable == true ) - { - %postEffect.enable(); - postVerbose("% - PostFX Manager - " @ %sName @ " enabled"); - } - else - { - %postEffect.disable(); - postVerbose("% - PostFX Manager - " @ %sName @ " disabled"); - } -} - -function PostFXManager::settingsRefreshSSAO(%this) -{ - //Apply the enabled flag - ppOptionsEnableSSAO.setValue($PostFXManager::PostFX::EnableSSAO); - - //Add the items we need to display - ppOptionsSSAOQuality.clear(); - ppOptionsSSAOQuality.add("Low", 0); - ppOptionsSSAOQuality.add("Medium", 1); - ppOptionsSSAOQuality.add("High", 2); - - //Set the selected, after adding the items! - ppOptionsSSAOQuality.setSelected($SSAOPostFx::quality); - - //SSAO - Set the values of the sliders, General Tab - ppOptionsSSAOOverallStrength.setValue($SSAOPostFx::overallStrength); - ppOptionsSSAOBlurDepth.setValue($SSAOPostFx::blurDepthTol); - ppOptionsSSAOBlurNormal.setValue($SSAOPostFx::blurNormalTol); - - //SSAO - Set the values for the near tab - ppOptionsSSAONearDepthMax.setValue($SSAOPostFx::sDepthMax); - ppOptionsSSAONearDepthMin.setValue($SSAOPostFx::sDepthMin); - ppOptionsSSAONearRadius.setValue($SSAOPostFx::sRadius); - ppOptionsSSAONearStrength.setValue($SSAOPostFx::sStrength); - ppOptionsSSAONearToleranceNormal.setValue($SSAOPostFx::sNormalTol); - ppOptionsSSAONearTolerancePower.setValue($SSAOPostFx::sNormalPow); - - //SSAO - Set the values for the far tab - ppOptionsSSAOFarDepthMax.setValue($SSAOPostFx::lDepthMax); - ppOptionsSSAOFarDepthMin.setValue($SSAOPostFx::lDepthMin); - ppOptionsSSAOFarRadius.setValue($SSAOPostFx::lRadius); - ppOptionsSSAOFarStrength.setValue($SSAOPostFx::lStrength); - ppOptionsSSAOFarToleranceNormal.setValue($SSAOPostFx::lNormalTol); - ppOptionsSSAOFarTolerancePower.setValue($SSAOPostFx::lNormalPow); -} - -function PostFXManager::settingsRefreshHDR(%this) -{ - //Apply the enabled flag - ppOptionsEnableHDR.setValue($PostFXManager::PostFX::EnableHDR); - - ppOptionsHDRBloom.setValue($HDRPostFX::enableBloom); - ppOptionsHDRBloomBlurBrightPassThreshold.setValue($HDRPostFX::brightPassThreshold); - ppOptionsHDRBloomBlurMean.setValue($HDRPostFX::gaussMean); - ppOptionsHDRBloomBlurMultiplier.setValue($HDRPostFX::gaussMultiplier); - ppOptionsHDRBloomBlurStdDev.setValue($HDRPostFX::gaussStdDev); - ppOptionsHDRBrightnessAdaptRate.setValue($HDRPostFX::adaptRate); - ppOptionsHDREffectsBlueShift.setValue($HDRPostFX::enableBlueShift); - ppOptionsHDREffectsBlueShiftColor.BaseColor = $HDRPostFX::blueShiftColor; - ppOptionsHDREffectsBlueShiftColor.PickColor = $HDRPostFX::blueShiftColor; - ppOptionsHDRKeyValue.setValue($HDRPostFX::keyValue); - ppOptionsHDRMinLuminance.setValue($HDRPostFX::minLuminace); - ppOptionsHDRToneMapping.setValue($HDRPostFX::enableToneMapping); - ppOptionsHDRToneMappingAmount.setValue($HDRPostFX::enableToneMapping); - ppOptionsHDRWhiteCutoff.setValue($HDRPostFX::whiteCutoff); - - %this-->ColorCorrectionFileName.Text = $HDRPostFX::colorCorrectionRamp; -} - -function PostFXManager::settingsRefreshLightrays(%this) -{ - //Apply the enabled flag - ppOptionsEnableLightRays.setValue($PostFXManager::PostFX::EnableLightRays); - - ppOptionsLightRaysBrightScalar.setValue($LightRayPostFX::brightScalar); - - ppOptionsLightRaysSampleScalar.setValue($LightRayPostFX::numSamples); - ppOptionsLightRaysDensityScalar.setValue($LightRayPostFX::density); - ppOptionsLightRaysWeightScalar.setValue($LightRayPostFX::weight); - ppOptionsLightRaysDecayScalar.setValue($LightRayPostFX::decay); -} - -function PostFXManager::settingsRefreshDOF(%this) -{ - //Apply the enabled flag - ppOptionsEnableDOF.setValue($PostFXManager::PostFX::EnableDOF); - - - //ppOptionsDOFEnableDOF.setValue($PostFXManager::PostFX::EnableDOF); - ppOptionsDOFEnableAutoFocus.setValue($DOFPostFx::EnableAutoFocus); - - ppOptionsDOFFarBlurMinSlider.setValue($DOFPostFx::BlurMin); - ppOptionsDOFFarBlurMaxSlider.setValue($DOFPostFx::BlurMax); - - ppOptionsDOFFocusRangeMinSlider.setValue($DOFPostFx::FocusRangeMin); - ppOptionsDOFFocusRangeMaxSlider.setValue($DOFPostFx::FocusRangeMax); - - ppOptionsDOFBlurCurveNearSlider.setValue($DOFPostFx::BlurCurveNear); - ppOptionsDOFBlurCurveFarSlider.setValue($DOFPostFx::BlurCurveFar); - -} - -function PostFXManager::settingsRefreshVignette(%this) -{ - //Apply the enabled flag - ppOptionsEnableVignette.setValue($PostFXManager::PostFX::EnableVignette); - -} - -function PostFXManager::settingsRefreshAll(%this) -{ - $PostFXManager::PostFX::Enabled = $pref::enablePostEffects; - $PostFXManager::PostFX::EnableSSAO = SSAOPostFx.isEnabled(); - $PostFXManager::PostFX::EnableHDR = HDRPostFX.isEnabled(); - $PostFXManager::PostFX::EnableLightRays = LightRayPostFX.isEnabled(); - $PostFXManager::PostFX::EnableDOF = DOFPostEffect.isEnabled(); - $PostFXManager::PostFX::EnableVignette = VignettePostEffect.isEnabled(); - - //For all the postFX here, apply the active settings in the system - //to the gui controls. - - %this.settingsRefreshSSAO(); - %this.settingsRefreshHDR(); - %this.settingsRefreshLightrays(); - %this.settingsRefreshDOF(); - %this.settingsRefreshVignette(); - - ppOptionsEnable.setValue($PostFXManager::PostFX::Enabled); - - postVerbose("% - PostFX Manager - GUI values updated."); -} - -function PostFXManager::settingsApplyFromPreset(%this) -{ - postVerbose("% - PostFX Manager - Applying from preset"); - - //SSAO Settings - $SSAOPostFx::blurDepthTol = $PostFXManager::Settings::SSAO::blurDepthTol; - $SSAOPostFx::blurNormalTol = $PostFXManager::Settings::SSAO::blurNormalTol; - $SSAOPostFx::lDepthMax = $PostFXManager::Settings::SSAO::lDepthMax; - $SSAOPostFx::lDepthMin = $PostFXManager::Settings::SSAO::lDepthMin; - $SSAOPostFx::lDepthPow = $PostFXManager::Settings::SSAO::lDepthPow; - $SSAOPostFx::lNormalPow = $PostFXManager::Settings::SSAO::lNormalPow; - $SSAOPostFx::lNormalTol = $PostFXManager::Settings::SSAO::lNormalTol; - $SSAOPostFx::lRadius = $PostFXManager::Settings::SSAO::lRadius; - $SSAOPostFx::lStrength = $PostFXManager::Settings::SSAO::lStrength; - $SSAOPostFx::overallStrength = $PostFXManager::Settings::SSAO::overallStrength; - $SSAOPostFx::quality = $PostFXManager::Settings::SSAO::quality; - $SSAOPostFx::sDepthMax = $PostFXManager::Settings::SSAO::sDepthMax; - $SSAOPostFx::sDepthMin = $PostFXManager::Settings::SSAO::sDepthMin; - $SSAOPostFx::sDepthPow = $PostFXManager::Settings::SSAO::sDepthPow; - $SSAOPostFx::sNormalPow = $PostFXManager::Settings::SSAO::sNormalPow; - $SSAOPostFx::sNormalTol = $PostFXManager::Settings::SSAO::sNormalTol; - $SSAOPostFx::sRadius = $PostFXManager::Settings::SSAO::sRadius; - $SSAOPostFx::sStrength = $PostFXManager::Settings::SSAO::sStrength; - - //HDR settings - $HDRPostFX::adaptRate = $PostFXManager::Settings::HDR::adaptRate; - $HDRPostFX::blueShiftColor = $PostFXManager::Settings::HDR::blueShiftColor; - $HDRPostFX::brightPassThreshold = $PostFXManager::Settings::HDR::brightPassThreshold; - $HDRPostFX::enableBloom = $PostFXManager::Settings::HDR::enableBloom; - $HDRPostFX::enableBlueShift = $PostFXManager::Settings::HDR::enableBlueShift; - $HDRPostFX::enableToneMapping = $PostFXManager::Settings::HDR::enableToneMapping; - $HDRPostFX::gaussMean = $PostFXManager::Settings::HDR::gaussMean; - $HDRPostFX::gaussMultiplier = $PostFXManager::Settings::HDR::gaussMultiplier; - $HDRPostFX::gaussStdDev = $PostFXManager::Settings::HDR::gaussStdDev; - $HDRPostFX::keyValue = $PostFXManager::Settings::HDR::keyValue; - $HDRPostFX::minLuminace = $PostFXManager::Settings::HDR::minLuminace; - $HDRPostFX::whiteCutoff = $PostFXManager::Settings::HDR::whiteCutoff; - $HDRPostFX::colorCorrectionRamp = $PostFXManager::Settings::ColorCorrectionRamp; - - //Light rays settings - $LightRayPostFX::brightScalar = $PostFXManager::Settings::LightRays::brightScalar; - - $LightRayPostFX::numSamples = $PostFXManager::Settings::LightRays::numSamples; - $LightRayPostFX::density = $PostFXManager::Settings::LightRays::density; - $LightRayPostFX::weight = $PostFXManager::Settings::LightRays::weight; - $LightRayPostFX::decay = $PostFXManager::Settings::LightRays::decay; - - //DOF settings - $DOFPostFx::EnableAutoFocus = $PostFXManager::Settings::DOF::EnableAutoFocus; - $DOFPostFx::BlurMin = $PostFXManager::Settings::DOF::BlurMin; - $DOFPostFx::BlurMax = $PostFXManager::Settings::DOF::BlurMax; - $DOFPostFx::FocusRangeMin = $PostFXManager::Settings::DOF::FocusRangeMin; - $DOFPostFx::FocusRangeMax = $PostFXManager::Settings::DOF::FocusRangeMax; - $DOFPostFx::BlurCurveNear = $PostFXManager::Settings::DOF::BlurCurveNear; - $DOFPostFx::BlurCurveFar = $PostFXManager::Settings::DOF::BlurCurveFar; - - //Vignette settings - $VignettePostEffect::VMax = $PostFXManager::Settings::Vignette::VMax; - $VignettePostEffect::VMin = $PostFXManager::Settings::Vignette::VMin; - - if ( $PostFXManager::forceEnableFromPresets ) - { - $PostFXManager::PostFX::Enabled = $PostFXManager::Settings::EnablePostFX; - $PostFXManager::PostFX::EnableDOF = $pref::PostFX::EnableDOF ? $PostFXManager::Settings::EnableDOF : false; - $PostFXManager::PostFX::EnableVignette = $pref::PostFX::EnableVignette ? $PostFXManager::Settings::EnableVignette : false; - $PostFXManager::PostFX::EnableLightRays = $pref::PostFX::EnableLightRays ? $PostFXManager::Settings::EnableLightRays : false; - $PostFXManager::PostFX::EnableHDR = $pref::PostFX::EnableHDR ? $PostFXManager::Settings::EnableHDR : false; - $PostFXManager::PostFX::EnableSSAO = $pref::PostFX::EnabledSSAO ? $PostFXManager::Settings::EnableSSAO : false; - - %this.settingsSetEnabled( true ); - } - - //make sure we apply the correct settings to the DOF - ppOptionsUpdateDOFSettings(); - - // Update the actual GUI controls if its awake ( otherwise it will when opened ). - if ( PostFXManager.isAwake() ) - %this.settingsRefreshAll(); -} - -function PostFXManager::settingsApplySSAO(%this) -{ - $PostFXManager::Settings::SSAO::blurDepthTol = $SSAOPostFx::blurDepthTol; - $PostFXManager::Settings::SSAO::blurNormalTol = $SSAOPostFx::blurNormalTol; - $PostFXManager::Settings::SSAO::lDepthMax = $SSAOPostFx::lDepthMax; - $PostFXManager::Settings::SSAO::lDepthMin = $SSAOPostFx::lDepthMin; - $PostFXManager::Settings::SSAO::lDepthPow = $SSAOPostFx::lDepthPow; - $PostFXManager::Settings::SSAO::lNormalPow = $SSAOPostFx::lNormalPow; - $PostFXManager::Settings::SSAO::lNormalTol = $SSAOPostFx::lNormalTol; - $PostFXManager::Settings::SSAO::lRadius = $SSAOPostFx::lRadius; - $PostFXManager::Settings::SSAO::lStrength = $SSAOPostFx::lStrength; - $PostFXManager::Settings::SSAO::overallStrength = $SSAOPostFx::overallStrength; - $PostFXManager::Settings::SSAO::quality = $SSAOPostFx::quality; - $PostFXManager::Settings::SSAO::sDepthMax = $SSAOPostFx::sDepthMax; - $PostFXManager::Settings::SSAO::sDepthMin = $SSAOPostFx::sDepthMin; - $PostFXManager::Settings::SSAO::sDepthPow = $SSAOPostFx::sDepthPow; - $PostFXManager::Settings::SSAO::sNormalPow = $SSAOPostFx::sNormalPow; - $PostFXManager::Settings::SSAO::sNormalTol = $SSAOPostFx::sNormalTol; - $PostFXManager::Settings::SSAO::sRadius = $SSAOPostFx::sRadius; - $PostFXManager::Settings::SSAO::sStrength = $SSAOPostFx::sStrength; - - postVerbose("% - PostFX Manager - Settings Saved - SSAO"); - -} - -function PostFXManager::settingsApplyHDR(%this) -{ - $PostFXManager::Settings::HDR::adaptRate = $HDRPostFX::adaptRate; - $PostFXManager::Settings::HDR::blueShiftColor = $HDRPostFX::blueShiftColor; - $PostFXManager::Settings::HDR::brightPassThreshold = $HDRPostFX::brightPassThreshold; - $PostFXManager::Settings::HDR::enableBloom = $HDRPostFX::enableBloom; - $PostFXManager::Settings::HDR::enableBlueShift = $HDRPostFX::enableBlueShift; - $PostFXManager::Settings::HDR::enableToneMapping = $HDRPostFX::enableToneMapping; - $PostFXManager::Settings::HDR::gaussMean = $HDRPostFX::gaussMean; - $PostFXManager::Settings::HDR::gaussMultiplier = $HDRPostFX::gaussMultiplier; - $PostFXManager::Settings::HDR::gaussStdDev = $HDRPostFX::gaussStdDev; - $PostFXManager::Settings::HDR::keyValue = $HDRPostFX::keyValue; - $PostFXManager::Settings::HDR::minLuminace = $HDRPostFX::minLuminace; - $PostFXManager::Settings::HDR::whiteCutoff = $HDRPostFX::whiteCutoff; - $PostFXManager::Settings::ColorCorrectionRamp = $HDRPostFX::colorCorrectionRamp; - - postVerbose("% - PostFX Manager - Settings Saved - HDR"); -} - -function PostFXManager::settingsApplyLightRays(%this) -{ - $PostFXManager::Settings::LightRays::brightScalar = $LightRayPostFX::brightScalar; - - $PostFXManager::Settings::LightRays::numSamples = $LightRayPostFX::numSamples; - $PostFXManager::Settings::LightRays::density = $LightRayPostFX::density; - $PostFXManager::Settings::LightRays::weight = $LightRayPostFX::weight; - $PostFXManager::Settings::LightRays::decay = $LightRayPostFX::decay; - - postVerbose("% - PostFX Manager - Settings Saved - Light Rays"); - -} - -function PostFXManager::settingsApplyDOF(%this) -{ - $PostFXManager::Settings::DOF::EnableAutoFocus = $DOFPostFx::EnableAutoFocus; - $PostFXManager::Settings::DOF::BlurMin = $DOFPostFx::BlurMin; - $PostFXManager::Settings::DOF::BlurMax = $DOFPostFx::BlurMax; - $PostFXManager::Settings::DOF::FocusRangeMin = $DOFPostFx::FocusRangeMin; - $PostFXManager::Settings::DOF::FocusRangeMax = $DOFPostFx::FocusRangeMax; - $PostFXManager::Settings::DOF::BlurCurveNear = $DOFPostFx::BlurCurveNear; - $PostFXManager::Settings::DOF::BlurCurveFar = $DOFPostFx::BlurCurveFar; - - postVerbose("% - PostFX Manager - Settings Saved - DOF"); - -} - -function PostFXManager::settingsApplyVignette(%this) -{ - $PostFXManager::Settings::Vignette::VMax = $VignettePostEffect::VMax; - $PostFXManager::Settings::Vignette::VMin = $VignettePostEffect::VMin; - - postVerbose("% - PostFX Manager - Settings Saved - Vignette"); - -} - -function PostFXManager::settingsApplyAll(%this, %sFrom) -{ - // Apply settings which control if effects are on/off altogether. - $PostFXManager::Settings::EnablePostFX = $PostFXManager::PostFX::Enabled; - $PostFXManager::Settings::EnableDOF = $PostFXManager::PostFX::EnableDOF; - $PostFXManager::Settings::EnableVignette = $PostFXManager::PostFX::EnableVignette; - $PostFXManager::Settings::EnableLightRays = $PostFXManager::PostFX::EnableLightRays; - $PostFXManager::Settings::EnableHDR = $PostFXManager::PostFX::EnableHDR; - $PostFXManager::Settings::EnableSSAO = $PostFXManager::PostFX::EnableSSAO; - - // Apply settings should save the values in the system to the - // the preset structure ($PostFXManager::Settings::*) - - // SSAO Settings - %this.settingsApplySSAO(); - // HDR settings - %this.settingsApplyHDR(); - // Light rays settings - %this.settingsApplyLightRays(); - // DOF - %this.settingsApplyDOF(); - // Vignette - %this.settingsApplyVignette(); - - postVerbose("% - PostFX Manager - All Settings applied to $PostFXManager::Settings"); -} - -function PostFXManager::settingsApplyDefaultPreset(%this) -{ - PostFXManager::loadPresetHandler($PostFXManager::defaultPreset); -} - diff --git a/Templates/BaseGame/game/core/postFX/scripts/ssao.cs b/Templates/BaseGame/game/core/postFX/scripts/ssao.cs index 5fe405a82..e902dd017 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/ssao.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/ssao.cs @@ -61,6 +61,8 @@ function SSAOPostFx::onAdd( %this ) { %this.wasVis = "Uninitialized"; %this.quality = "Uninitialized"; + + PostFXManager.registerPostEffect(%this); } function SSAOPostFx::preProcess( %this ) @@ -128,7 +130,87 @@ function SSAOPostFx::onDisabled( %this ) $AL::UseSSAOMask = false; } +function SSAOPostFx::populatePostFXSettings(%this) +{ + PostEffectEditorInspector.startGroup("SSAO - General"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::EnabledSSAO", "Enabled", "bool", "Low,Medium,High", $PostFXManager::PostFX::EnableSSAO, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::quality", "Quality", "list", "Low,Medium,High", $SSAOPostFx::quality, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::overallStrength", "Overall Strength", "float", "", $SSAOPostFx::overallStrength, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::blurDepthTol", "Blur (Softness)", "float", "", $SSAOPostFx::blurDepthTol, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::blurNormalTol", "Blur (Normal Maps)", "float", "", $SSAOPostFx::blurNormalTol, ""); + PostEffectEditorInspector.endGroup(); + + PostEffectEditorInspector.startGroup("SSAO - Near"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::sRadius", "Radius", "list", "Low,Medium,High", $SSAOPostFx::sRadius, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::sStrength", "Strength", "float", "", $SSAOPostFx::sStrength, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::sDepthMin", "Depth Min", "float", "", $SSAOPostFx::sDepthMin, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::sDepthMax", "Depth Max", "float", "", $SSAOPostFx::sDepthMax, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::sNormalTol", "Normal Map Tolerance", "float", "", $SSAOPostFx::sNormalTol, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::sNormalPow", "Normal Map Power", "float", "", $SSAOPostFx::sNormalPow, ""); + PostEffectEditorInspector.endGroup(); + + PostEffectEditorInspector.startGroup("SSAO - Far"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::lRadius", "Radius", "list", "Low,Medium,High", $SSAOPostFx::lRadius, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::lStrength", "Strength", "float", "", $SSAOPostFx::lStrength, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::lDepthMin", "Depth Min", "float", "", $SSAOPostFx::lDepthMin, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::lDepthMax", "Depth Max", "float", "", $SSAOPostFx::lDepthMax, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::lNormalTol", "Normal Map Tolerance", "float", "", $SSAOPostFx::lNormalTol, ""); + PostEffectEditorInspector.addField("$PostFXManager::Settings::SSAO::lNormalPow", "Normal Map Power", "float", "", $SSAOPostFx::lNormalPow, ""); + PostEffectEditorInspector.endGroup(); +} +function SSAOPostFx::applyFromPreset(%this) +{ + //SSAO Settings + $PostFXManager::PostFX::EnableSSAO = $PostFXManager::Settings::EnabledSSAO; + $SSAOPostFx::blurDepthTol = $PostFXManager::Settings::SSAO::blurDepthTol; + $SSAOPostFx::blurNormalTol = $PostFXManager::Settings::SSAO::blurNormalTol; + $SSAOPostFx::lDepthMax = $PostFXManager::Settings::SSAO::lDepthMax; + $SSAOPostFx::lDepthMin = $PostFXManager::Settings::SSAO::lDepthMin; + $SSAOPostFx::lDepthPow = $PostFXManager::Settings::SSAO::lDepthPow; + $SSAOPostFx::lNormalPow = $PostFXManager::Settings::SSAO::lNormalPow; + $SSAOPostFx::lNormalTol = $PostFXManager::Settings::SSAO::lNormalTol; + $SSAOPostFx::lRadius = $PostFXManager::Settings::SSAO::lRadius; + $SSAOPostFx::lStrength = $PostFXManager::Settings::SSAO::lStrength; + $SSAOPostFx::overallStrength = $PostFXManager::Settings::SSAO::overallStrength; + $SSAOPostFx::quality = $PostFXManager::Settings::SSAO::quality; + $SSAOPostFx::sDepthMax = $PostFXManager::Settings::SSAO::sDepthMax; + $SSAOPostFx::sDepthMin = $PostFXManager::Settings::SSAO::sDepthMin; + $SSAOPostFx::sDepthPow = $PostFXManager::Settings::SSAO::sDepthPow; + $SSAOPostFx::sNormalPow = $PostFXManager::Settings::SSAO::sNormalPow; + $SSAOPostFx::sNormalTol = $PostFXManager::Settings::SSAO::sNormalTol; + $SSAOPostFx::sRadius = $PostFXManager::Settings::SSAO::sRadius; + $SSAOPostFx::sStrength = $PostFXManager::Settings::SSAO::sStrength; + + if($PostFXManager::PostFX::EnableSSAO) + %this.enable(); + else + %this.disable(); +} + +function SSAOPostFx::settingsApply(%this) +{ + $PostFXManager::Settings::EnabledSSAO = $PostFXManager::PostFX::EnableSSAO ; + + $PostFXManager::Settings::SSAO::blurDepthTol = $SSAOPostFx::blurDepthTol; + $PostFXManager::Settings::SSAO::blurNormalTol = $SSAOPostFx::blurNormalTol; + $PostFXManager::Settings::SSAO::lDepthMax = $SSAOPostFx::lDepthMax; + $PostFXManager::Settings::SSAO::lDepthMin = $SSAOPostFx::lDepthMin; + $PostFXManager::Settings::SSAO::lDepthPow = $SSAOPostFx::lDepthPow; + $PostFXManager::Settings::SSAO::lNormalPow = $SSAOPostFx::lNormalPow; + $PostFXManager::Settings::SSAO::lNormalTol = $SSAOPostFx::lNormalTol; + $PostFXManager::Settings::SSAO::lRadius = $SSAOPostFx::lRadius; + $PostFXManager::Settings::SSAO::lStrength = $SSAOPostFx::lStrength; + $PostFXManager::Settings::SSAO::overallStrength = $SSAOPostFx::overallStrength; + $PostFXManager::Settings::SSAO::quality = $SSAOPostFx::quality; + $PostFXManager::Settings::SSAO::sDepthMax = $SSAOPostFx::sDepthMax; + $PostFXManager::Settings::SSAO::sDepthMin = $SSAOPostFx::sDepthMin; + $PostFXManager::Settings::SSAO::sDepthPow = $SSAOPostFx::sDepthPow; + $PostFXManager::Settings::SSAO::sNormalPow = $SSAOPostFx::sNormalPow; + $PostFXManager::Settings::SSAO::sNormalTol = $SSAOPostFx::sNormalTol; + $PostFXManager::Settings::SSAO::sRadius = $SSAOPostFx::sRadius; + $PostFXManager::Settings::SSAO::sStrength = $SSAOPostFx::sStrength; +} //----------------------------------------------------------------------------- // GFXStateBlockData / ShaderData //----------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/core/rendering/Core_Rendering.cs b/Templates/BaseGame/game/core/rendering/Core_Rendering.cs index 21624a3f1..06271eb0c 100644 --- a/Templates/BaseGame/game/core/rendering/Core_Rendering.cs +++ b/Templates/BaseGame/game/core/rendering/Core_Rendering.cs @@ -9,6 +9,8 @@ function Core_Rendering::onCreate(%this) $Core::DefaultPrefilterCubemap = "core/rendering/images/default_prefilter.dds"; $Core::BRDFTexture = "core/rendering/images/brdfTexture.dds"; + $pref::ReflectionProbes::BakeResolution = ProjectSettings.value("Rendering/ProbeCaptureResolution", "64"); + exec("./scripts/renderManager.cs"); exec("./scripts/gfxData/clouds.cs"); exec("./scripts/gfxData/commonMaterialData.cs"); diff --git a/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl b/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl index cc15a3a90..3bf586218 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl @@ -47,6 +47,8 @@ uniform vec4 albedo; #define MAX_PROBES 50 #define MAX_FORWARD_PROBES 4 +#define MAX_FORWARD_LIGHT 4 + vec3 getDistanceVectorToPlane( vec3 origin, vec3 direction, vec4 plane ) { float denum = dot( plane.xyz, direction.xyz ); @@ -64,32 +66,6 @@ vec3 getDistanceVectorToPlane( float negFarPlaneDotEye, vec3 direction, vec4 pla return direction.xyz * t; } -void compute4Lights( vec3 wsView, - vec3 wsPosition, - vec3 wsNormal, - vec4 shadowMask, - - #ifdef TORQUE_SHADERGEN - - vec4 inLightPos[3], - vec4 inLightInvRadiusSq, - vec4 inLightColor[4], - vec4 inLightSpotDir[3], - vec4 inLightSpotAngle, - vec4 inLightSpotFalloff, - float smoothness, - float metalness, - vec4 albedo, - - #endif // TORQUE_SHADERGEN - - out vec4 outDiffuse, - out vec4 outSpecular ) -{ - outDiffuse = vec4(0,0,0,0); - outSpecular = vec4(0,0,0,0); -} - struct Surface { vec3 P; // world space position @@ -123,43 +99,43 @@ void updateSurface(inout Surface surface) Surface createSurface(vec4 normDepth, sampler2D colorBuffer, sampler2D matInfoBuffer, in vec2 uv, in vec3 wsEyePos, in vec3 wsEyeRay, in mat4 invView) { - Surface surface;// = Surface(); + Surface surface;// = Surface(); - vec4 gbuffer1 = texture(colorBuffer, uv); - vec4 gbuffer2 = texture(matInfoBuffer, uv); - surface.depth = normDepth.a; - surface.P = wsEyePos + wsEyeRay * surface.depth; - surface.N = tMul(invView, vec4(normDepth.xyz,0)).xyz; - surface.V = normalize(wsEyePos - surface.P); - surface.baseColor = gbuffer1; - const float minRoughness=1e-4; - surface.roughness = clamp(1.0 - gbuffer2.b, minRoughness, 1.0); //t3d uses smoothness, so we convert to roughness. - surface.roughness_brdf = surface.roughness * surface.roughness; - surface.metalness = gbuffer2.a; - surface.ao = gbuffer2.g; - surface.matFlag = gbuffer2.r; - updateSurface(surface); - return surface; + vec4 gbuffer1 = texture(colorBuffer, uv); + vec4 gbuffer2 = texture(matInfoBuffer, uv); + surface.depth = normDepth.a; + surface.P = wsEyePos + wsEyeRay * surface.depth; + surface.N = tMul(invView, vec4(normDepth.xyz,0)).xyz; + surface.V = normalize(wsEyePos - surface.P); + surface.baseColor = gbuffer1; + const float minRoughness=1e-4; + surface.roughness = clamp(1.0 - gbuffer2.b, minRoughness, 1.0); //t3d uses smoothness, so we convert to roughness. + surface.roughness_brdf = surface.roughness * surface.roughness; + surface.metalness = gbuffer2.a; + surface.ao = gbuffer2.g; + surface.matFlag = gbuffer2.r; + updateSurface(surface); + return surface; } -Surface createForwardSurface(vec4 baseColor, vec4 normal, vec4 pbrProperties, in vec2 uv, in vec3 wsPosition, in vec3 wsEyePos, in vec3 wsEyeRay, in mat4x4 invView) +Surface createForwardSurface(vec4 baseColor, vec3 normal, vec4 pbrProperties, in vec3 wsPosition, in vec3 wsEyePos, in vec3 wsEyeRay) { - Surface surface;// = Surface(); + Surface surface;// = Surface(); - surface.depth = 0; - surface.P = wsPosition; - surface.N = tMul(invView, vec4(normal.xyz,0)).xyz; - surface.V = normalize(wsEyePos - surface.P); - surface.baseColor = baseColor; - const float minRoughness=1e-4; - surface.roughness = clamp(1.0 - pbrProperties.b, minRoughness, 1.0); //t3d uses smoothness, so we convert to roughness. - surface.roughness_brdf = surface.roughness * surface.roughness; - surface.metalness = pbrProperties.a; - surface.ao = pbrProperties.g; - surface.matFlag = pbrProperties.r; + surface.depth = 0; + surface.P = wsPosition; + surface.N = normal; + surface.V = normalize(wsEyePos - surface.P); + surface.baseColor = baseColor; + const float minRoughness=1e-4; + surface.roughness = clamp(1.0 - pbrProperties.b, minRoughness, 1.0); //t3d uses smoothness, so we convert to roughness. + surface.roughness_brdf = surface.roughness * surface.roughness; + surface.metalness = pbrProperties.a; + surface.ao = pbrProperties.g; + surface.matFlag = pbrProperties.r; - updateSurface(surface); - return surface; + updateSurface(surface); + return surface; } struct SurfaceToLight @@ -237,7 +213,7 @@ vec3 getDirectionalLight(in Surface surface, in SurfaceToLight surfaceToLight, v vec3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor; vec3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor; - vec3 final = max(vec3(0.0f), diffuse + spec * surface.ao); + vec3 final = max(vec3(0.0f), diffuse + spec); return final; } @@ -249,45 +225,71 @@ vec3 getPunctualLight(in Surface surface, in SurfaceToLight surfaceToLight, vec3 vec3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor; vec3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor; - vec3 final = max(vec3(0.0f), diffuse + spec * surface.ao * surface.F); + vec3 final = max(vec3(0.0f), diffuse + spec * surface.F); return final; } -float G1V(float dotNV, float k) +vec4 compute4Lights( Surface surface, + vec4 shadowMask, + vec4 inLightPos[4], + vec4 inLightConfigData[4], + vec4 inLightColor[4], + vec4 inLightSpotDir[4], + vec4 lightSpotParams[4], + int hasVectorLight, + vec4 vectorLightDirection, + vec4 vectorLightingColor, + float vectorLightBrightness ) { - return 1.0f/(dotNV*(1.0f-k)+k); -} + vec3 finalLighting = vec3(0.0f); -vec3 directSpecular(vec3 N, vec3 V, vec3 L, float roughness, float F0) -{ - float alpha = roughness*roughness; + int i; + for(i = 0; i < MAX_FORWARD_LIGHT; i++) + { + vec3 L = inLightPos[i].xyz - surface.P; + float dist = length(L); + float lightRange = inLightConfigData[i].z; + SurfaceToLight surfaceToLight = createSurfaceToLight(surface, L); + float shadowed = 1.0; - //TODO don't need to calculate all this again timmy!!!!!! - vec3 H = normalize(V + L); - float dotNL = clamp(dot(N,L), 0.0, 1.0); - float dotNV = clamp(dot(N,V), 0.0, 1.0); - float dotNH = clamp(dot(N,H), 0.0, 1.0); - float dotHV = clamp(dot(H,V), 0.0, 1.0); - float dotLH = clamp(dot(L,H), 0.0, 1.0); + vec3 lightCol = inLightColor[i].rgb; - float F, D, vis; + float lightBrightness = inLightConfigData[i].y; + float lightInvSqrRange= inLightConfigData[i].a; - // D - float alphaSqr = alpha*alpha; - float pi = 3.14159f; - float denom = dotNH * dotNH *(alphaSqr-1.0) + 1.0f; - D = alphaSqr/(pi * denom * denom); + vec3 lighting = vec3(0.0f); - // F - float dotLH5 = pow(1.0f-dotLH,5); - F = F0 + (1.0-F0)*(dotLH5); + if(dist < lightRange) + { + if(inLightConfigData[i].x == 0) //point + { + //get punctual light contribution + lighting = getPunctualLight(surface, surfaceToLight, lightCol, lightBrightness, lightInvSqrRange, shadowed); + } + else //spot + { + + //get Punctual light contribution + lighting = getPunctualLight(surface, surfaceToLight, lightCol, lightBrightness, lightInvSqrRange, shadowed); + //get spot angle attenuation + lighting *= getSpotAngleAtt(-surfaceToLight.L, inLightSpotDir[i].xyz, lightSpotParams[i].xy ); + } + } + finalLighting += lighting; + } - // V - float k = alpha/2.0f; - vis = G1V(dotNL,k)*G1V(dotNV,k); + //Vector light + if(hasVectorLight == 1) + { + SurfaceToLight surfaceToVecLight = createSurfaceToLight(surface, -vectorLightDirection.xyz); - float specular = dotNL * D * F * vis; - return vec3(specular,specular,specular); + vec3 vecLighting = getDirectionalLight(surface, surfaceToVecLight, vectorLightingColor.rgb, vectorLightBrightness, 1); + finalLighting += vecLighting; + } + + finalLighting *= shadowMask.rgb; + + return vec4(finalLighting,1); } //Probe IBL stuff @@ -316,12 +318,12 @@ float defineBoxSpaceInfluence(vec3 wsPosition, mat4 worldToObj, float attenuatio // Box Projected IBL Lighting // Based on: http://www.gamedev.net/topic/568829-box-projected-cubemap-environment-mapping/ // and https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ -vec3 boxProject(vec3 wsPosition, vec3 wsReflectVec, mat4 worldToObj, vec3 bbMin, vec3 bbMax, vec3 refPosition) +vec3 boxProject(vec3 wsPosition, vec3 wsReflectVec, mat4 worldToObj, vec3 refBoxMin, vec3 refBoxMax, vec3 refPosition) { vec3 RayLS = tMul(worldToObj, vec4(wsReflectVec, 0.0)).xyz; vec3 PositionLS = tMul(worldToObj, vec4(wsPosition, 1.0)).xyz; - vec3 unit = bbMax.xyz - bbMin.xyz; + vec3 unit = refBoxMax.xyz - refBoxMin.xyz; vec3 plane1vec = (unit / 2 - PositionLS) / RayLS; vec3 plane2vec = (-unit / 2 - PositionLS) / RayLS; vec3 furthestPlane = max(plane1vec, plane2vec); @@ -333,12 +335,12 @@ vec3 boxProject(vec3 wsPosition, vec3 wsReflectVec, mat4 worldToObj, vec3 bbMin, vec4 computeForwardProbes(Surface surface, float cubeMips, float numProbes, mat4x4 worldToObjArray[MAX_FORWARD_PROBES], vec4 probeConfigData[MAX_FORWARD_PROBES], - vec4 inProbePosArray[MAX_FORWARD_PROBES], vec4 bbMinArray[MAX_FORWARD_PROBES], vec4 bbMaxArray[MAX_FORWARD_PROBES], vec4 inRefPosArray[MAX_FORWARD_PROBES], - float hasSkylight, sampler2D BRDFTexture, - samplerCube skylightIrradMap, samplerCube skylightSpecularMap, + vec4 inProbePosArray[MAX_FORWARD_PROBES], vec4 refBoxMinArray[MAX_FORWARD_PROBES], vec4 refBoxMaxArray[MAX_FORWARD_PROBES], vec4 inRefPosArray[MAX_FORWARD_PROBES], + float skylightCubemapIdx, sampler2D BRDFTexture, samplerCubeArray irradianceCubemapAR, samplerCubeArray specularCubemapAR) { - int i = 0; + int i = 0; + float alpha = 1; float blendFactor[MAX_FORWARD_PROBES]; float blendSum = 0; float blendFacSum = 0; @@ -399,15 +401,13 @@ vec4 computeForwardProbes(Surface surface, // Radiance (Specular) float lod = surface.roughness*cubeMips; -//1 - float alpha = 1.0f; for (i = 0; i < numProbes; ++i) { float contrib = contribution[i]; - if (contrib != 0) + if (contrib > 0.0f) { int cubemapIdx = int(probeConfigData[i].a); - vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], bbMinArray[i].xyz, bbMaxArray[i].xyz, inRefPosArray[i].xyz); + vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refBoxMinArray[i].xyz, refBoxMaxArray[i].xyz, inRefPosArray[i].xyz); irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib; specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib; @@ -415,10 +415,10 @@ vec4 computeForwardProbes(Surface surface, } } - if (hasSkylight == 1 && alpha > 0.001) + if(skylightCubemapIdx != -1 && alpha >= 0.001) { - irradiance += textureLod(skylightIrradMap, surface.R, 0).xyz * alpha; - specular += textureLod(skylightSpecularMap, surface.R, lod).xyz * alpha; + irradiance = mix(irradiance,textureLod(irradianceCubemapAR, vec4(surface.R, skylightCubemapIdx), 0).xyz, alpha); + specular = mix(specular,textureLod(specularCubemapAR, vec4(surface.R, skylightCubemapIdx), lod).xyz, alpha); } vec3 F = FresnelSchlickRoughness(surface.NdotV, surface.f0, surface.roughness); @@ -429,13 +429,12 @@ vec4 computeForwardProbes(Surface surface, //apply brdf //Do it once to save on texture samples - vec2 brdf = textureLod(BRDFTexture, vec2(surface.roughness, surface.NdotV),0).xy; + vec2 brdf = textureLod(BRDFTexture, vec2(surface.roughness, 1.0-surface.NdotV),0).xy; specular *= brdf.x * F + brdf.y; //final diffuse color vec3 diffuse = kD * irradiance * surface.baseColor.rgb; vec4 finalColor = vec4(diffuse + specular * surface.ao, 1.0); - finalColor = vec4(irradiance.rgb,1); return finalColor; } diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl b/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl index 71f10fb09..fdf6f45b9 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl +++ b/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl @@ -99,6 +99,8 @@ struct Surface } }; + + inline Surface createSurface(float4 gbuffer0, TORQUE_SAMPLER2D(gbufferTex1), TORQUE_SAMPLER2D(gbufferTex2), in float2 uv, in float3 wsEyePos, in float3 wsEyeRay, in float4x4 invView) { Surface surface = (Surface)0; @@ -124,28 +126,28 @@ inline Surface createSurface(float4 gbuffer0, TORQUE_SAMPLER2D(gbufferTex1), TOR inline Surface createForwardSurface(float4 baseColor, float3 normal, float4 pbrProperties, in float3 wsPosition, in float3 wsEyePos, in float3 wsEyeRay) { - Surface surface = (Surface)0; + Surface surface = (Surface)0; - surface.depth = 0; - surface.P = wsPosition; - surface.N = normal; - surface.V = normalize(wsEyePos - surface.P); - surface.baseColor = baseColor; - const float minRoughness=1e-4; - surface.roughness = clamp(1.0 - pbrProperties.b, minRoughness, 1.0); //t3d uses smoothness, so we convert to roughness. - surface.roughness_brdf = surface.roughness * surface.roughness; - surface.metalness = pbrProperties.a; - surface.ao = pbrProperties.g; - surface.matFlag = pbrProperties.r; + surface.depth = 0; + surface.P = wsPosition; + surface.N = normal; + surface.V = normalize(wsEyePos - surface.P); + surface.baseColor = baseColor; + const float minRoughness=1e-4; + surface.roughness = clamp(1.0 - pbrProperties.b, minRoughness, 1.0); //t3d uses smoothness, so we convert to roughness. + surface.roughness_brdf = surface.roughness * surface.roughness; + surface.metalness = pbrProperties.a; + surface.ao = pbrProperties.g; + surface.matFlag = pbrProperties.r; - surface.Update(); - return surface; + surface.Update(); + return surface; } struct SurfaceToLight { float3 L; // surface to light vector - float3 Lu; // un-normalized surface to light vector + float3 Lu; // un-normalized surface to light vector float3 H; // half-vector between view vector and light vector float NdotL; // cos(angle between N and L) float HdotV; // cos(angle between H and V) = HdotL = cos(angle between H and L) @@ -155,7 +157,7 @@ struct SurfaceToLight inline SurfaceToLight createSurfaceToLight(in Surface surface, in float3 L) { SurfaceToLight surfaceToLight = (SurfaceToLight)0; - surfaceToLight.Lu = L; + surfaceToLight.Lu = L; surfaceToLight.L = normalize(L); surfaceToLight.H = normalize(surface.V + surfaceToLight.L); surfaceToLight.NdotL = saturate(dot(surfaceToLight.L, surface.N)); diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/deferredShadingP.glsl b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/deferredShadingP.glsl index aefdfedd9..949aec129 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/deferredShadingP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/deferredShadingP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../../postFx/gl/postFX.glsl" +#include "../../../postFx/gl/postFx.glsl" #include "../../../gl/torque.glsl" uniform sampler2D colorBufferTex; diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/pointLightP.glsl b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/pointLightP.glsl index 03353c7fc..a58cbe4f0 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/pointLightP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/pointLightP.glsl @@ -175,7 +175,7 @@ void main() #ifdef SHADOW_CUBE // TODO: We need to fix shadow cube to handle soft shadows! - float occ = texture( shadowMap, ttMul( worldToLightProj, -surfaceToLight.L ) ).r; + float occ = texture( shadowMap, tMul( worldToLightProj, -surfaceToLight.L ) ).r; float shadowed = saturate( exp( lightParams.y * ( occ - distToLight ) ) ); #else @@ -192,7 +192,7 @@ void main() #ifdef USE_COOKIE_TEX // Lookup the cookie sample. - vec4 cookie = texture(cookieMap, ttMul(worldToLightProj, -surfaceToLight.L)); + vec4 cookie = texture(cookieMap, tMul(worldToLightProj, -surfaceToLight.L)); // Multiply the light with the cookie tex. lightCol *= cookie.rgb; // Use a maximum channel luminance to attenuate diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/probeShadingP.glsl b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/probeShadingP.glsl deleted file mode 100644 index 437340d29..000000000 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/probeShadingP.glsl +++ /dev/null @@ -1,68 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2012 GarageGames, LLC -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#include "../../../gl/hlslCompat.glsl" -#include "shadergen:/autogenConditioners.h" -#include "../../../postFx/gl/postFX.glsl" -#include "../../../gl/torque.glsl" - -uniform sampler2D colorBufferTex; -uniform sampler2D diffuseLightingBuffer; -uniform sampler2D matInfoTex; -uniform sampler2D specularLightingBuffer; -uniform sampler2D deferredTex; - -uniform float radius; -uniform vec2 targetSize; -uniform int captureRez; - -out vec4 OUT_col; - -void main() -{ - float depth = deferredUncondition( deferredTex, uv0 ).w; - if (depth>0.9999) - { - discard; - return; - } - vec3 colorBuffer = texture( colorBufferTex, uv0 ).rgb; //albedo - vec4 matInfo = texture(matInfoTex, uv0); //flags|smoothness|ao|metallic - - bool emissive = getFlag(matInfo.r, 0); - if (emissive) - { - OUT_col = vec4(colorBuffer, 1.0); - return; - } - - vec4 diffuseLighting = texture( diffuseLightingBuffer, uv0 ); //shadowmap*specular - colorBuffer *= diffuseLighting.rgb; - vec2 relUV = uv0*targetSize/captureRez; - - //we use a 1k depth range in the capture frustum. - //reduce that a bit to get something resembling depth fidelity out of 8 bits - depth*=2000/radius; - - float rLen = length(vec3(relUV,depth)-vec3(0.5,0.5,0)); - OUT_col = hdrEncode( vec4(colorBuffer,rLen)); -} diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeArrayP.glsl b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeArrayP.glsl index 90781a799..77a17c3a6 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeArrayP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeArrayP.glsl @@ -27,15 +27,15 @@ uniform samplerCubeArray irradianceCubemapAR; uniform vec4 inProbePosArray[MAX_PROBES]; uniform vec4 inRefPosArray[MAX_PROBES]; uniform mat4 worldToObjArray[MAX_PROBES]; -uniform vec4 bbMinArray[MAX_PROBES]; -uniform vec4 bbMaxArray[MAX_PROBES]; +uniform vec4 refBoxMinArray[MAX_PROBES]; +uniform vec4 refBoxMaxArray[MAX_PROBES]; uniform vec4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten #if DEBUGVIZ_CONTRIB uniform vec4 probeContribColors[MAX_PROBES]; #endif -uniform float skylightCubemapIdx; +uniform int skylightCubemapIdx; out vec4 OUT_col; @@ -55,7 +55,6 @@ void main() float alpha = 1; -#ifdef SKYLIGHT_ONLY #if SKYLIGHT_ONLY == 0 int i = 0; float blendFactor[MAX_PROBES]; @@ -66,8 +65,8 @@ void main() //Set up our struct data float contribution[MAX_PROBES]; - //if (alpha > 0) - //{ + if (alpha > 0) + { //Process prooooobes for (i = 0; i < numProbes; ++i) { @@ -85,8 +84,6 @@ void main() if (contribution[i]>0.0) probehits++; } - else - continue; contribution[i] = max(contribution[i],0); @@ -99,32 +96,29 @@ void main() // Weight1 = normalized inverted NDF, so we have 1 at center, 0 at boundary // and respect constraint A. - if (probehits>1.0) - { - for (i = 0; i < numProbes; i++) - { - blendFactor[i] = ((contribution[i] / blendSum)) / probehits; - blendFactor[i] *= ((contribution[i]) / invBlendSum); - blendFactor[i] = saturate(blendFactor[i]); - blendFacSum += blendFactor[i]; - } + if (probehits > 1.0) + { + for (i = 0; i < numProbes; i++) + { + blendFactor[i] = ((contribution[i] / blendSum)) / probehits; + blendFactor[i] *= ((contribution[i]) / invBlendSum); + blendFactor[i] = saturate(blendFactor[i]); + blendFacSum += blendFactor[i]; + } - // Normalize blendVal - if (blendFacSum == 0.0f) // Possible with custom weight - { - blendFacSum = 1.0f; - } + // Normalize blendVal + if (blendFacSum == 0.0f) // Possible with custom weight + { + blendFacSum = 1.0f; + } - float invBlendSumWeighted = 1.0f / blendFacSum; - for (i = 0; i < numProbes; ++i) - { - blendFactor[i] *= invBlendSumWeighted; - contribution[i] *= blendFactor[i]; - alpha -= contribution[i]; - } + float invBlendSumWeighted = 1.0f / blendFacSum; + for (i = 0; i < numProbes; ++i) + { + blendFactor[i] *= invBlendSumWeighted; + contribution[i] *= blendFactor[i]; + } } - else - alpha -= blendSum; #if DEBUGVIZ_ATTENUATION == 1 float contribAlpha = 1; @@ -148,14 +142,13 @@ void main() //Skylight coloration for anything not covered by probes above if(skylightCubemapIdx != -1) - finalContribColor += vec3(0.3, 0.3, 0.3) * contribAlpha; + finalContribColor += vec3(0, 1, 0) * contribAlpha; OUT_col = vec4(finalContribColor, 1); return; #endif - //} + } #endif -#endif //SKYLIGHT_ONLY vec3 irradiance = vec3(0, 0, 0); vec3 specular = vec3(0, 0, 0); @@ -167,16 +160,14 @@ void main() float lod = 0; #endif -#ifdef SKYLIGHT_ONLY #if SKYLIGHT_ONLY == 0 - alpha = 1; for (i = 0; i < numProbes; ++i) { float contrib = contribution[i]; - if (contrib != 0) + if (contrib > 0.0f) { float cubemapIdx = probeConfigData[i].a; - vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], bbMinArray[i].xyz, bbMaxArray[i].xyz, inRefPosArray[i].xyz); + vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refBoxMinArray[i].xyz, refBoxMaxArray[i].xyz, inRefPosArray[i].xyz); irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib; specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib; @@ -184,7 +175,6 @@ void main() } } #endif -#endif //SKYLIGHT_ONLY if (skylightCubemapIdx != -1 && alpha > 0.001) { diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeP.glsl b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeP.glsl deleted file mode 100644 index fee0b8783..000000000 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeP.glsl +++ /dev/null @@ -1,162 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2012 GarageGames, LLC -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" -#include "shadergen:/autogenConditioners.h" -#include "farFrustumQuad.glsl" -#include "../../../gl/torque.glsl" -#include "../../../gl/lighting.glsl" -#line 27 - -in vec4 pos; -in vec4 wsEyeDir; -in vec4 ssPos; -in vec4 vsEyeDir; - -uniform sampler2D deferredBuffer; -uniform sampler2D colorBuffer; -uniform sampler2D matInfoBuffer; -uniform samplerCube cubeMap; -uniform samplerCube irradianceCubemap; -uniform sampler2D BRDFTexture; -uniform float cubeMips; - -uniform vec4 rtParams0; - -uniform vec3 probeWSPos; -uniform vec3 probeLSPos; -uniform vec4 vsFarPlane; - -uniform float radius; -uniform vec2 attenuation; - -uniform mat4 worldToObj; -uniform mat4 cameraToWorld; - -uniform vec3 eyePosWorld; -uniform vec3 bbMin; -uniform vec3 bbMax; - -uniform float useSphereMode; - -// Box Projected IBL Lighting -// Based on: http://www.gamedev.net/topic/568829-box-projected-cubemap-environment-mapping/ -// and https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ -vec3 boxProject(vec3 wsPosition, vec3 reflectDir, vec3 boxWSPos, vec3 boxMin, vec3 boxMax) -{ - vec3 nrdir = reflectDir; - vec3 offset = wsPosition; - vec3 plane1vec = (boxMax - offset) / nrdir; - vec3 plane2vec = (boxMin - offset) / nrdir; - - vec3 furthestPlane = max(plane1vec, plane2vec); - float dist = min(min(furthestPlane.x, furthestPlane.y), furthestPlane.z); - vec3 posonbox = offset + nrdir * dist; - - return posonbox - boxWSPos; -} - -vec3 iblBoxSpecular(vec3 normal, vec3 wsPos, float roughness, vec3 surfToEye, - sampler2D brdfTexture, - samplerCube radianceCube, - vec3 boxPos, - vec3 boxMin, - vec3 boxMax) -{ - float ndotv = clamp(dot(normal, surfToEye), 0.0, 1.0); - - // BRDF - vec2 brdf = textureLod(brdfTexture, vec2(roughness, ndotv),0).xy; - - // Radiance (Specular) - float maxmip = pow(cubeMips+1,2); - float lod = roughness*maxmip; - vec3 r = reflect(surfToEye, normal); - vec3 cubeR = normalize(r); - cubeR = boxProject(wsPos, cubeR, boxPos, boxMin, boxMax); - - vec3 radiance = textureLod(radianceCube, cubeR, lod).xyz * (brdf.x + brdf.y); - - return radiance; -} - -float defineBoxSpaceInfluence(vec3 surfPosWS, vec3 probePos, float radius, float atten) -{ - vec3 surfPosLS = tMul( worldToObj, vec4(surfPosWS,1.0)).xyz; - - vec3 boxMinLS = probePos-(vec3(1,1,1)*radius); - vec3 boxMaxLS = probePos+(vec3(1,1,1)*radius); - - float boxOuterRange = length(boxMaxLS - boxMinLS); - float boxInnerRange = boxOuterRange / atten; - - vec3 localDir = vec3(abs(surfPosLS.x), abs(surfPosLS.y), abs(surfPosLS.z)); - localDir = (localDir - boxInnerRange) / (boxOuterRange - boxInnerRange); - - return max(localDir.x, max(localDir.y, localDir.z)) * -1; -} -out vec4 OUT_col; - -void main() -{ - - // Compute scene UV - vec2 uvScene = getUVFromSSPos( ssPos.xyz/ssPos.w, rtParams0 ); - - //eye ray WS/LS - vec3 vsEyeRay = getDistanceVectorToPlane( -vsFarPlane.w, vsEyeDir.xyz, vsFarPlane ); - vec3 wsEyeRay = tMul(cameraToWorld, vec4(vsEyeRay, 0)).xyz; - - //unpack normal and linear depth - vec4 normDepth = deferredUncondition(deferredBuffer, uvScene); - - //create surface - Surface surface = createSurface( normDepth, colorBuffer, matInfoBuffer, - uvScene, eyePosWorld, wsEyeRay, cameraToWorld); - float blendVal = 1.0; - if(useSphereMode>0) - { - vec3 L = probeWSPos - surface.P; - blendVal = 1.0-length(L)/radius; - clip(blendVal); - } - else - { - float tempAttenVal = 3.5; - blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal); - clip(blendVal); - float compression = 0.05; - blendVal=(1.0-compression)+blendVal*compression; - } - //render into the bound space defined above - vec3 surfToEye = normalize(surface.P - eyePosWorld); - vec3 irradiance = textureLod(irradianceCubemap, surface.N,0).xyz; - vec3 specular = iblBoxSpecular(surface.N, surface.P, surface.roughness, surfToEye, BRDFTexture, cubeMap, probeWSPos, bbMin, bbMax); - vec3 F = FresnelSchlickRoughness(surface.NdotV, surface.f0, surface.roughness); - specular *= F; - //energy conservation - vec3 kD = vec3(1.0) - F; - kD *= 1.0 - surface.metalness; - //final diffuse color - vec3 diffuse = kD * irradiance * surface.baseColor.rgb; - - OUT_col = vec4(diffuse + specular * surface.ao, blendVal); -} diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeV.glsl b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeV.glsl deleted file mode 100644 index 5d48e6613..000000000 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/reflectionProbeV.glsl +++ /dev/null @@ -1,32 +0,0 @@ -#include "shadergen:/autogenConditioners.h" -#include "../../torque.hlsl" - -// This is the shader input -struct Vert -{ - float4 position : POSITION; - float2 uv0 : TEXCOORD0; - float3 wsEyeRay : TEXCOORD1; -}; - -// This is the shader output data. -struct Conn -{ - float4 position : POSITION; - float2 uv0 : TEXCOORD0; - float3 wsEyeRay : TEXCOORD1; -}; - -// Render Target Paramaters -float4 rtParams0; - -Conn main(Vert IN, - uniform float4x4 modelView : register(C0)) -{ - Conn OUT; - OUT.position = IN.position; - OUT.uv0 = viewportCoordToRenderTarget( IN.uv0, rtParams0 ); - OUT.wsEyeRay = IN.wsEyeRay; - return OUT; -} - diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/reflectionProbeArrayP.hlsl b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/reflectionProbeArrayP.hlsl index 589b99624..283eb8fae 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/reflectionProbeArrayP.hlsl +++ b/Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/reflectionProbeArrayP.hlsl @@ -93,7 +93,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET // and respect constraint A. if (probehits > 1.0) - { + { for (i = 0; i < numProbes; i++) { blendFactor[i] = ((contribution[i] / blendSum)) / probehits; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/caustics/gl/causticsP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/caustics/gl/causticsP.glsl index d002fd7e1..7bcf39173 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/caustics/gl/causticsP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/caustics/gl/causticsP.glsl @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- #include "../../../gl/hlslCompat.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" #include "shadergen:/autogenConditioners.h" uniform vec3 eyePosWorld; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_P.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_P.glsl index 38cb099c4..33754006b 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_P.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_P.glsl @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- #include "../../../gl/hlslCompat.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" // These are set by the game engine. uniform sampler2D shrunkSampler; // Output of DofDownsample() diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_V.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_V.glsl index d02ce6551..ab2d7ef62 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_V.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_CalcCoC_V.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "../../../gl/torque.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform vec4 rtParams0; uniform vec4 rtParams1; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_P.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_P.glsl index 9b976ba1e..96f775cfd 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_P.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_P.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D colorSampler; // Original source image uniform sampler2D smallBlurSampler; // Output of SmallBlurPS() @@ -73,7 +73,7 @@ half4 InterpolateDof( half3 small, half3 med, half3 large, half t ) // d0, the small to medium blur over distance d1, and the medium to // large blur over distance d2, where d0 + d1 + d2 = 1. //vec4 dofLerpScale = vec4( -1 / d0, -1 / d1, -1 / d2, 1 / d2 ); - //vec4 dofLerpBias = vec4( 1, (1 – d2) / d1, 1 / d2, (d2 – 1) / d2 ); + //vec4 dofLerpBias = vec4( 1, (1 � d2) / d1, 1 / d2, (d2 � 1) / d2 ); weights = saturate( t * dofLerpScale + dofLerpBias ); weights.yz = min( weights.yz, 1 - weights.xy ); diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_V.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_V.glsl index abc91246e..f8d5f62a6 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_V.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Final_V.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "../../../gl/torque.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform vec4 rtParams0; uniform vec4 rtParams1; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Passthrough_V.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Passthrough_V.glsl index bd02fb7d4..cce9df691 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Passthrough_V.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/dof/gl/DOF_Passthrough_V.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "../../../gl/torque.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform vec4 rtParams0; uniform vec4 rtParams1; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAP.glsl index 216dc8725..5f2701b12 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D edgeBuffer; uniform sampler2D backBuffer; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAV.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAV.glsl index 975532272..f886d9313 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAV.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/edgeaa/gl/edgeAAV.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "../../../gl/torque.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform vec4 rtParams0; uniform vec4 rtParams1; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/chromaticLens.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/chromaticLens.glsl index fdb85ba00..e0aac53c7 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/chromaticLens.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/chromaticLens.glsl @@ -20,10 +20,10 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -// Based on 'Cubic Lens Distortion HLSL Shader' by François Tarlier +// Based on 'Cubic Lens Distortion HLSL Shader' by Fran�ois Tarlier // www.francois-tarlier.com/blog/index.php/2009/11/cubic-lens-distortion-shader -#include "./postFX.glsl" +#include "./postFx.glsl" #include "../../gl/torque.glsl" #include "../../gl/hlslCompat.glsl" diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/flashP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/flashP.glsl index fc5072e6d..a287a135f 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/flashP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/flashP.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "./postFX.glsl" +#include "./postFx.glsl" #include "../../gl/torque.glsl" #include "../../gl/hlslCompat.glsl" diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/motionBlurP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/motionBlurP.glsl index 8077d4124..9eff3382c 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/motionBlurP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/motionBlurP.glsl @@ -23,7 +23,7 @@ #include "../../gl/hlslCompat.glsl" #include "../../gl/torque.glsl" #include "shadergen:/autogenConditioners.h" -#include "postFX.glsl" +#include "postFx.glsl" #undef IN_uv0 #define _IN_uv0 uv0 diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/underwaterFogP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/underwaterFogP.glsl index 8b1b80bc0..ea9126566 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/underwaterFogP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/gl/underwaterFogP.glsl @@ -22,7 +22,7 @@ #include "../../gl/hlslCompat.glsl" #include "../../gl/torque.glsl" -#include "postFX.glsl" +#include "postFx.glsl" #include "shadergen:/autogenConditioners.h" //----------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurHP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurHP.glsl index 1d9a2df3e..f3486dce2 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurHP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurHP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D inputTex ; uniform vec2 oneOverTargetSize; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurVP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurVP.glsl index 68f34b164..5a456bea5 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurVP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/bloomGaussBlurVP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D inputTex ; uniform vec2 oneOverTargetSize; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/brightPassFilterP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/brightPassFilterP.glsl index f220ca1e7..222185a4c 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/brightPassFilterP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/brightPassFilterP.glsl @@ -23,7 +23,7 @@ #include "../../../gl/torque.glsl" #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D inputTex ; uniform sampler2D luminanceTex ; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/calculateAdaptedLumP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/calculateAdaptedLumP.glsl index 96ee9d6df..ea23a489d 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/calculateAdaptedLumP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/calculateAdaptedLumP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D currLum; uniform sampler2D lastAdaptedLum; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/finalPassCombineP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/finalPassCombineP.glsl index 224e51c5b..4a532345f 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/finalPassCombineP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/finalPassCombineP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/torque.glsl" #include "../../../gl/hlslCompat.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" #include "shadergen:/autogenConditioners.h" uniform sampler2D sceneTex; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/luminanceVisP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/luminanceVisP.glsl index ee9c28c87..3ced367c3 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/luminanceVisP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/luminanceVisP.glsl @@ -23,7 +23,7 @@ #include "../../../gl/torque.glsl" #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D inputTex; uniform float brightPassThreshold; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumInitialP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumInitialP.glsl index 8a2b9b318..18455d646 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumInitialP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumInitialP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/torque.glsl" #include "../../../gl/hlslCompat.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D inputTex; uniform vec2 texSize0; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumIterativeP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumIterativeP.glsl index 2e800d612..162141225 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumIterativeP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/hdr/gl/sampleLumIterativeP.glsl @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- #include "../../../gl/hlslCompat.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D inputTex; uniform vec2 oneOverTargetSize; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayOccludeP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayOccludeP.glsl index 59f5f4bbf..1f5fdf102 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayOccludeP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayOccludeP.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D backBuffer; // The original backbuffer. uniform sampler2D deferredTex; // The pre-pass depth and normals. diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayP.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayP.glsl index 6d78f4eae..4e06edb4b 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayP.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/lightRay/gl/lightRayP.glsl @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- #include "../../../gl/hlslCompat.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" uniform sampler2D frameSampler; uniform sampler2D backBuffer; diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_P.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_P.glsl index cfff88381..e4b17098a 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_P.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_P.glsl @@ -22,7 +22,7 @@ #include "../../../gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" #define DOSMALL #define DOLARGE diff --git a/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_PowerTable_V.glsl b/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_PowerTable_V.glsl index a193f63ce..2b1d983d0 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_PowerTable_V.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/postFX/ssao/gl/SSAO_PowerTable_V.glsl @@ -22,7 +22,7 @@ #include "../../../gl/torque.glsl" #include "../../../gl/hlslCompat.glsl" -#include "../../gl/postFX.glsl" +#include "../../gl/postFx.glsl" void main() { diff --git a/Templates/BaseGame/game/data/ExampleModule/ExampleModule.cs b/Templates/BaseGame/game/data/ExampleModule/ExampleModule.cs index 02e316f13..1004dd8cd 100644 --- a/Templates/BaseGame/game/data/ExampleModule/ExampleModule.cs +++ b/Templates/BaseGame/game/data/ExampleModule/ExampleModule.cs @@ -6,7 +6,6 @@ //else. function ExampleModule::onCreate(%this) { - %bool = true; } //Similar to the create function, this is defined in thye module file, and called @@ -70,6 +69,8 @@ function ExampleModule::onDestroyGameServer(%this) function ExampleModule::initClient(%this) { AssetDatabase.acquireAsset("ExampleModule:exampleDatablock"); + AssetDatabase.acquireAsset("ExampleModule:examplePostEffect"); + AssetDatabase.acquireAsset("ExampleModule:exampleGUI"); //client scripts //Here, we exec out keybind scripts so the player is able to move when they get into a game @@ -91,7 +92,7 @@ function ExampleModule::initClient(%this) function ExampleModule::onCreateClientConnection(%this) { //This will push our keybind movemap onto the input stack, so we can control our camera in our ExampleGameMode - ExampleMoveMap.push(); + //ExampleMoveMap.push(); } //This is called when a client game session disconnects from a game server @@ -103,5 +104,5 @@ function ExampleModule::onCreateClientConnection(%this) function ExampleModule::onDestroyClientConnection(%this) { //This will pop the keybind, cleaning it up from the input stack, as it no longer applies - ExampleMoveMap.pop(); + //ExampleMoveMap.pop(); } \ No newline at end of file diff --git a/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module b/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module index d66580ddb..8680e0483 100644 --- a/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module +++ b/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module @@ -12,14 +12,4 @@ canSaveDynamicFields="true" Extension="asset.taml" Recurse="true" /> - - diff --git a/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.mis b/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.mis index b77aab33b..9ef5dce70 100644 --- a/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.mis +++ b/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.mis @@ -2,13 +2,16 @@ new Scene(EditorTemplateLevel) { canSave = "1"; canSaveDynamicFields = "1"; + isSubScene = "0"; + isEditing = "0"; + isDirty = "0"; + gameModeName = "ExampleGameMode"; cdTrack = "2"; CTF_scoreLimit = "5"; - enabled = "1"; + Enabled = "1"; musicTrack = "lush"; - gameModeName="ExampleGameMode"; - new LevelInfo(TheLevelInfo) { + new LevelInfo(theLevelInfo) { nearClip = "0.1"; visibleDistance = "1000"; visibleGhostDistance = "0"; @@ -20,67 +23,14 @@ new Scene(EditorTemplateLevel) { canvasClearColor = "0 0 0 255"; ambientLightBlendPhase = "1"; ambientLightBlendCurve = "0 0 -1 -1"; - advancedLightmapSupport = "0"; soundAmbience = "AudioAmbienceDefault"; soundDistanceModel = "Linear"; canSave = "1"; canSaveDynamicFields = "1"; + advancedLightmapSupport = "0"; desc0 = "A blank room template that acts as a starting point."; - enabled = "1"; - levelName = "Blank Room Template"; - }; - new SkyBox(theSky) { - Material = "BlankSkyMat"; - drawBottom = "0"; - fogBandHeight = "0"; - position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - canSave = "1"; - canSaveDynamicFields = "1"; - }; - new Sun(theSun) { - azimuth = "230.396"; - elevation = "45"; - color = "0.968628 0.901961 0.901961 1"; - ambient = "0.337255 0.533333 0.619608 1"; - brightness = "1"; - castShadows = "1"; - staticRefreshFreq = "250"; - dynamicRefreshFreq = "8"; - coronaEnabled = "1"; - coronaScale = "0.5"; - coronaTint = "1 1 1 1"; - coronaUseLightColor = "1"; - flareScale = "1"; - attenuationRatio = "0 1 1"; - shadowType = "PSSM"; - texSize = "1024"; - overDarkFactor = "3000 1500 750 250"; - shadowDistance = "200"; - shadowSoftness = "0.25"; - numSplits = "4"; - logWeight = "0.9"; - fadeStartDistance = "0"; - lastSplitTerrainOnly = "0"; - representedInLightmap = "0"; - shadowDarkenColor = "0 0 0 -1"; - includeLightmappedGeometryInShadow = "0"; - position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - canSave = "1"; - canSaveDynamicFields = "1"; - bias = "0.1"; - Blur = "1"; - enabled = "1"; - height = "1024"; - lightBleedFactor = "0.8"; - minVariance = "0"; - pointShadowType = "PointShadowType_Paraboloid"; - shadowBox = "-100 -100 -100 100 100 100"; - splitFadeDistances = "1 1 1 1"; - width = "3072"; + Enabled = "1"; + LevelName = "Blank Room Template"; }; new GroundPlane() { squareSize = "128"; @@ -89,11 +39,69 @@ new Scene(EditorTemplateLevel) { Material = "Grid_512_Grey"; canSave = "1"; canSaveDynamicFields = "1"; - enabled = "1"; + Enabled = "1"; position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; }; + new ScatterSky() { + skyBrightness = "25"; + sunSize = "1"; + colorizeAmount = "0"; + colorize = "0 0 0 1"; + rayleighScattering = "0.0035"; + sunScale = "1 1 1 1"; + ambientScale = "1 1 1 1"; + fogScale = "1 1 1 1"; + exposure = "1"; + zOffset = "0"; + azimuth = "0"; + elevation = "35"; + moonAzimuth = "0"; + moonElevation = "45"; + castShadows = "1"; + staticRefreshFreq = "8"; + dynamicRefreshFreq = "8"; + brightness = "1"; + flareScale = "1"; + nightColor = "0.0196078 0.0117647 0.109804 1"; + nightFogColor = "0.0196078 0.0117647 0.109804 1"; + moonEnabled = "1"; + moonMat = "Moon_Glow_Mat"; + moonScale = "0.2"; + moonLightColor = "0.192157 0.192157 0.192157 1"; + useNightCubemap = "1"; + nightCubemap = "NightCubemap"; + attenuationRatio = "0 1 1"; + shadowType = "PSSM"; + texSize = "1024"; + overDarkFactor = "2000 1000 500 100"; + shadowDistance = "400"; + shadowSoftness = "0.15"; + numSplits = "4"; + logWeight = "0.91"; + fadeStartDistance = "0"; + lastSplitTerrainOnly = "0"; + representedInLightmap = "0"; + shadowDarkenColor = "0 0 0 -1"; + includeLightmappedGeometryInShadow = "0"; + position = "-19.4839 100.725 -19.5889"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + canSave = "1"; + canSaveDynamicFields = "1"; + mieScattering = "0.0045"; + }; + new Skylight() { + Enabled = "1"; + ReflectionMode = "Baked Cubemap"; + position = "-2.09752 10.8435 53.7998"; + rotation = "1 0 0 0"; + canSave = "1"; + canSaveDynamicFields = "1"; + persistentId = "fff282f5-dced-11e9-a423-bb0e346e3870"; + reflectionPath = "D:/Gamedev/T3DMIT/T3DPreview4_0/Bugfixaroo/My Projects/Bugfixaroo/game/data/ExampleModule/levels/ExampleLevel/probes/"; + }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/ExampleModule/postFXs/ExamplePostEffect.cs b/Templates/BaseGame/game/data/ExampleModule/postFXs/ExamplePostEffect.cs index 9afb33843..93d44262e 100644 --- a/Templates/BaseGame/game/data/ExampleModule/postFXs/ExamplePostEffect.cs +++ b/Templates/BaseGame/game/data/ExampleModule/postFXs/ExamplePostEffect.cs @@ -61,6 +61,12 @@ function ExamplePostEffect::preProcess( %this ) { } +function ExamplePostEffect::onAdd(%this) +{ + //Register the postFX with the manager + PostFXManager.registerPostEffect(%this); +} + function ExamplePostEffect::onEnabled( %this ) { return true; @@ -70,6 +76,35 @@ function ExamplePostEffect::onDisabled( %this ) { } +//This is used to populate the PostFXEditor's settings so the post FX can be edited +//This is automatically polled for any postFX that has been registered(in our onAdd) and the settings +//are thus exposed for editing +function ExamplePostEffect::populatePostFXSettings(%this) +{ + PostEffectEditorInspector.startGroup("ExamplePostEffect - General"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::EnabledExamplePostEffect", "Enabled", "bool", "", $PostFXManager::PostFX::EnableExamplePostEffect, ""); + PostEffectEditorInspector.endGroup(); +} + +//This function pair(applyFromPreset and settingsApply) are done the way they are, with the separated variables +//so that we can effectively store the 'settings' away from the live variables that the postFX's actually utilize +//when rendering. This allows us to modify things but still leave room for reverting or temporarily applying them +function ExamplePostEffect::applyFromPreset(%this) +{ + //ExamplePostEffect Settings + $PostFXManager::PostFX::EnableExamplePostEffect = $PostFXManager::Settings::EnabledExamplePostEffect; + + if($PostFXManager::PostFX::EnableExamplePostEffect) + %this.enable(); + else + %this.disable(); +} + +function ExamplePostEffect::settingsApply(%this) +{ + $PostFXManager::Settings::EnabledExamplePostEffect = $PostFXManager::PostFX::EnableExamplePostEffect; +} + singleton PostEffect( ExamplePostEffect ) { isEnabled = false; diff --git a/Templates/BaseGame/game/data/Kork/Images/player_Albedo.asset.taml b/Templates/BaseGame/game/data/Kork/Images/player_Albedo.asset.taml deleted file mode 100644 index 206391ce3..000000000 --- a/Templates/BaseGame/game/data/Kork/Images/player_Albedo.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/Kork/Images/player_Albedo.png b/Templates/BaseGame/game/data/Kork/Images/player_Albedo.png deleted file mode 100644 index 155ab087a..000000000 Binary files a/Templates/BaseGame/game/data/Kork/Images/player_Albedo.png and /dev/null differ diff --git a/Templates/BaseGame/game/data/Kork/Kork.cs b/Templates/BaseGame/game/data/Kork/Kork.cs deleted file mode 100644 index 2e921446a..000000000 --- a/Templates/BaseGame/game/data/Kork/Kork.cs +++ /dev/null @@ -1,19 +0,0 @@ -function Kork::onCreate(%this) -{ -} - -function Kork::onDestroy(%this) -{ -} - -function Kork::initServer(%this){} - -function Kork::onCreateGameServer(%this){} - -function Kork::onDestroyGameServer(%this){} - -function Kork::initClient(%this){} - -function Kork::onCreateClientConnection(%this){} - -function Kork::onDestroyClientConnection(%this){} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/Kork/Kork.module b/Templates/BaseGame/game/data/Kork/Kork.module deleted file mode 100644 index 5e369c1f0..000000000 --- a/Templates/BaseGame/game/data/Kork/Kork.module +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.asset.taml b/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.asset.taml deleted file mode 100644 index 2d388c636..000000000 --- a/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.cs b/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.cs deleted file mode 100644 index 6eeb7c0de..000000000 --- a/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.cs +++ /dev/null @@ -1,5 +0,0 @@ - -singleton TSShapeConstructor(OrcMageDts) -{ - baseShape = "./OrcMage.dts"; -}; diff --git a/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.dts b/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.dts deleted file mode 100644 index 2be05c66c..000000000 Binary files a/Templates/BaseGame/game/data/Kork/Shapes/OrcMage.dts and /dev/null differ diff --git a/Templates/BaseGame/game/data/Kork/materials/player_mat.asset.taml b/Templates/BaseGame/game/data/Kork/materials/player_mat.asset.taml deleted file mode 100644 index b6ce43996..000000000 --- a/Templates/BaseGame/game/data/Kork/materials/player_mat.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/Kork/materials/player_mat.cs b/Templates/BaseGame/game/data/Kork/materials/player_mat.cs deleted file mode 100644 index e55ed8ec1..000000000 --- a/Templates/BaseGame/game/data/Kork/materials/player_mat.cs +++ /dev/null @@ -1,6 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -singleton Material(player_mat) { - mapTo = "player"; - DiffuseMapAsset[0] = "Kork:player_Albedo"; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_BaseColor.asset.taml b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_BaseColor.asset.taml deleted file mode 100644 index 09c67d083..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_BaseColor.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_BaseColor.png b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_BaseColor.png deleted file mode 100644 index 4630832d0..000000000 Binary files a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_BaseColor.png and /dev/null differ diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Metallic.png b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Metallic.png deleted file mode 100644 index 0f0289d5b..000000000 Binary files a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Metallic.png and /dev/null differ diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Metallic.taml b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Metallic.taml deleted file mode 100644 index 8b5c70a88..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Metallic.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Roughness.png b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Roughness.png deleted file mode 100644 index cdbc2a298..000000000 Binary files a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Roughness.png and /dev/null differ diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Roughness.taml b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Roughness.taml deleted file mode 100644 index d3fd5df5d..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_Roughness.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_normal.png b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_normal.png deleted file mode 100644 index a60d459a3..000000000 Binary files a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_normal.png and /dev/null differ diff --git a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_normal.taml b/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_normal.taml deleted file mode 100644 index a73277e13..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/Images/Orc_Material_normal.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.asset.taml b/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.asset.taml deleted file mode 100644 index 8ecad1219..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.cs b/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.cs deleted file mode 100644 index 5410cda78..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.cs +++ /dev/null @@ -1,5 +0,0 @@ - -singleton TSShapeConstructor(SpaceOrcMageDts) -{ - baseShape = "./SpaceOrcMage.dts"; -}; diff --git a/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.dts b/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.dts deleted file mode 100644 index 13de557d4..000000000 Binary files a/Templates/BaseGame/game/data/SpaceOrc/Shapes/SpaceOrcMage.dts and /dev/null differ diff --git a/Templates/BaseGame/game/data/SpaceOrc/SpaceOrc.cs b/Templates/BaseGame/game/data/SpaceOrc/SpaceOrc.cs deleted file mode 100644 index 677da37e0..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/SpaceOrc.cs +++ /dev/null @@ -1,19 +0,0 @@ -function SpaceOrc::onCreate(%this) -{ -} - -function SpaceOrc::onDestroy(%this) -{ -} - -function SpaceOrc::initServer(%this){} - -function SpaceOrc::onCreateGameServer(%this){} - -function SpaceOrc::onDestroyGameServer(%this){} - -function SpaceOrc::initClient(%this){} - -function SpaceOrc::onCreateClientConnection(%this){} - -function SpaceOrc::onDestroyClientConnection(%this){} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/SpaceOrc/SpaceOrc.module b/Templates/BaseGame/game/data/SpaceOrc/SpaceOrc.module deleted file mode 100644 index 9d226ea28..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/SpaceOrc.module +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/Templates/BaseGame/game/data/SpaceOrc/materials/Orc_Material.asset.taml b/Templates/BaseGame/game/data/SpaceOrc/materials/Orc_Material.asset.taml deleted file mode 100644 index 01e55a374..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/materials/Orc_Material.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/SpaceOrc/materials/Orc_Material.cs b/Templates/BaseGame/game/data/SpaceOrc/materials/Orc_Material.cs deleted file mode 100644 index cdfc2c6a2..000000000 --- a/Templates/BaseGame/game/data/SpaceOrc/materials/Orc_Material.cs +++ /dev/null @@ -1,12 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -singleton Material(Orc_Material) { - mapTo = "Orc_Material"; - DiffuseMapAsset[0] = "SpaceOrc:Orc_Material_BaseColor"; - diffuseMap[0] = "data/SpaceOrc/Images/Orc_Material_BaseColor.png"; - normalMap[0] = "data/SpaceOrc/Images/Orc_Material_normal.png"; - invertSmoothness[0] = "1"; - roughMap[0] = "data/SpaceOrc/Images/Orc_Material_Roughness.png"; - metalMap[0] = "data/SpaceOrc/Images/Orc_Material_Metallic.png"; - DiffuseMapAsset0 = "SpaceOrc:Orc_Material_BaseColor"; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Images/Grid_512_orange.png b/Templates/BaseGame/game/data/StaticShapeTest/Images/Grid_512_orange.png deleted file mode 100644 index 43c4953e8..000000000 Binary files a/Templates/BaseGame/game/data/StaticShapeTest/Images/Grid_512_orange.png and /dev/null differ diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Images/Grid_512_orange_ALBEDO.asset.taml b/Templates/BaseGame/game/data/StaticShapeTest/Images/Grid_512_orange_ALBEDO.asset.taml deleted file mode 100644 index 207d697bc..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/Images/Grid_512_orange_ALBEDO.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.asset.taml b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.asset.taml deleted file mode 100644 index 385eebc44..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.cs b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.cs deleted file mode 100644 index e5f5535c9..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.cs +++ /dev/null @@ -1,5 +0,0 @@ - -singleton TSShapeConstructor(CubeFbx) -{ - baseShape = "./Cube.fbx"; -}; diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.fbx b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.fbx deleted file mode 100644 index 944bc46b3..000000000 Binary files a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cube.fbx and /dev/null differ diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.asset.taml b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.asset.taml deleted file mode 100644 index 2550fd56b..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.asset.taml +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.cs b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.cs deleted file mode 100644 index 25a1e3298..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.cs +++ /dev/null @@ -1,5 +0,0 @@ - -singleton TSShapeConstructor(CylinderFbx) -{ - baseShape = "./Cylinder.fbx"; -}; diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.fbx b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.fbx deleted file mode 100644 index dc74730e1..000000000 Binary files a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/Cylinder.fbx and /dev/null differ diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/materials.cs b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/materials.cs deleted file mode 100644 index 988debb42..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/materials.cs +++ /dev/null @@ -1,21 +0,0 @@ - -singleton Material(Grid_512_Orange) -{ - mapTo = "Grid_512_orange"; - diffuseColor[0] = "0.8 0.8 0.8 1"; - diffuseMap[0] = "tools/base/images/512_orange.png"; - specular[0] = "0.8 0.8 0.8 1"; - specularPower[0] = "0.25"; - specularStrength[0] = "25"; - translucentBlendOp = "LerpAlpha"; - smoothness[0] = "1"; - metalness[0] = "1"; - DiffuseMapAsset0 = "StaticShapeTest:Grid_512_orange_ALBEDO"; - specularStrength0 = "25"; - specular0 = "0.8 0.8 0.8 1"; - specularPower0 = "0.25"; - emissive[0] = "0"; - translucent = "1"; - normalMap[0] = "data/pbr/images/FloorEbony_normal.png"; - invertSmoothness[0] = "1"; -}; diff --git a/Templates/BaseGame/game/data/StaticShapeTest/StaticShapeTest.cs b/Templates/BaseGame/game/data/StaticShapeTest/StaticShapeTest.cs deleted file mode 100644 index 43e335106..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/StaticShapeTest.cs +++ /dev/null @@ -1,19 +0,0 @@ -function StaticShapeTest::onCreate(%this) -{ -} - -function StaticShapeTest::onDestroy(%this) -{ -} - -function StaticShapeTest::initServer(%this){} - -function StaticShapeTest::onCreateGameServer(%this){} - -function StaticShapeTest::onDestroyGameServer(%this){} - -function StaticShapeTest::initClient(%this){} - -function StaticShapeTest::onCreateClientConnection(%this){} - -function StaticShapeTest::onDestroyClientConnection(%this){} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/StaticShapeTest/StaticShapeTest.module b/Templates/BaseGame/game/data/StaticShapeTest/StaticShapeTest.module deleted file mode 100644 index 44a535b69..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/StaticShapeTest.module +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/Templates/BaseGame/game/data/StaticShapeTest/materials/Grid_512_orange.asset.taml b/Templates/BaseGame/game/data/StaticShapeTest/materials/Grid_512_orange.asset.taml deleted file mode 100644 index 63f68bd6c..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/materials/Grid_512_orange.asset.taml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/StaticShapeTest/materials/Grid_512_orange.cs b/Templates/BaseGame/game/data/StaticShapeTest/materials/Grid_512_orange.cs deleted file mode 100644 index 84e941012..000000000 --- a/Templates/BaseGame/game/data/StaticShapeTest/materials/Grid_512_orange.cs +++ /dev/null @@ -1,7 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -singleton Material(Grid_512_orange) { - mapTo = "Grid_512_orange"; - DiffuseMap[0] = "data/StaticShapeTest/Images/Grid_512_orange.png"; - DiffuseMapAsset[0] = "StaticShapeTest:Grid_512_orange_ALBEDO"; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/shaderCache/.gitignore b/Templates/BaseGame/game/data/shaderCache/.gitignore new file mode 100644 index 000000000..013488d4e --- /dev/null +++ b/Templates/BaseGame/game/data/shaderCache/.gitignore @@ -0,0 +1,2 @@ +*.hlsl +*.glsl \ No newline at end of file diff --git a/Templates/BaseGame/game/data/ui/scripts/displayMenu.cs b/Templates/BaseGame/game/data/ui/scripts/displayMenu.cs index f8f59ae40..71fb68b65 100644 --- a/Templates/BaseGame/game/data/ui/scripts/displayMenu.cs +++ b/Templates/BaseGame/game/data/ui/scripts/displayMenu.cs @@ -90,9 +90,9 @@ function GraphicsDriverSetting::set(%setting) function GraphicsDriverSetting::get() { - if($pref::Video::displayDevice == "D3D11") + if($pref::Video::displayDevice $= "D3D11") return "D3D11"; - else if($pref::Video::displayDevice == "OpenGL") + else if($pref::Video::displayDevice $= "OpenGL") return "OpenGL"; else return "Unknown"; @@ -103,6 +103,7 @@ function GraphicsDriverSetting::getList() %returnsList = ""; %buffer = getDisplayDeviceList(); %deviceCount = getFieldCount( %buffer ); + %numAdapters = GFXInit::getAdapterCount(); %count = 0; for(%i = 0; %i < %deviceCount; %i++) @@ -112,10 +113,19 @@ function GraphicsDriverSetting::getList() if(%deviceDesc $= "GFX Null Device") continue; + for( %i = 0; %i < %numAdapters; %i ++ ) + { + if( GFXInit::getAdapterName( %i ) $= %deviceDesc ) + { + %deviceName = GFXInit::getAdapterType( %i ); + break; + } + } + if(%count != 0) - %returnsList = %returnsList @ "," @ %deviceDesc; + %returnsList = %returnsList @ "," @ %deviceName; else - %returnsList = %deviceDesc; + %returnsList = %deviceName; %count++; } diff --git a/Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs b/Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs index d652d4d59..6ffa97590 100644 --- a/Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs +++ b/Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs @@ -284,11 +284,11 @@ function GraphicsMenu::Autodetect_Apply(%this, %shaderVer, %intel, %videoMem ) %this.apply(); //force postFX updates - PostFXManager.settingsEffectSetEnabled("SSAO", $pref::PostFX::EnableSSAO); - PostFXManager.settingsEffectSetEnabled("HDR", $pref::PostFX::EnableHDR); - PostFXManager.settingsEffectSetEnabled("DOF", $pref::PostFX::EnableDOF); - PostFXManager.settingsEffectSetEnabled("LightRays", $pref::PostFX::EnableLightRays); - PostFXManager.settingsEffectSetEnabled("Vignette", $pref::PostFX::EnableVignette); + PostFXManager.settingsEffectSetEnabled(SSAOPostFx, $pref::PostFX::EnableSSAO); + PostFXManager.settingsEffectSetEnabled(HDRPostFX, $pref::PostFX::EnableHDR); + PostFXManager.settingsEffectSetEnabled(DOFPostEffect, $pref::PostFX::EnableDOF); + PostFXManager.settingsEffectSetEnabled(LightRayPostFX, $pref::PostFX::EnableLightRays); + PostFXManager.settingsEffectSetEnabled(VignettePostEffect, $pref::PostFX::EnableVignette); return "Graphics quality settings have been auto detected."; } @@ -368,7 +368,7 @@ function GraphicsMenu::loadSettings() OptionsSettingStack.clear(); OptionsMenu.addSettingOption(OptionsSettingStack, "Shadow Quality", "", "ShadowQuality"); - OptionsMenu.addSettingOption(OptionsSettingStack, "Shadow Caching", "", "ShadowCaching"); + //OptionsMenu.addSettingOption(OptionsSettingStack, "Shadow Caching", "", "ShadowCaching"); OptionsMenu.addSettingOption(OptionsSettingStack, "Soft Shadows", "", "SoftShadow"); OptionsMenu.addSettingOption(OptionsSettingStack, "Model Detail", "", "MeshQuality"); diff --git a/Templates/BaseGame/game/tools/MainEditor/scripts/newEditorGui.cs b/Templates/BaseGame/game/tools/MainEditor/scripts/newEditorGui.cs index 53a3ea88b..59a8e541e 100644 --- a/Templates/BaseGame/game/tools/MainEditor/scripts/newEditorGui.cs +++ b/Templates/BaseGame/game/tools/MainEditor/scripts/newEditorGui.cs @@ -16,7 +16,7 @@ function NewEditorGui::AddWindow(%this) minExtent = "8 2"; horizSizing = "width"; vertSizing = "height"; - profile = "GuiTabPageProfile"; + profile = "ToolsGuiTabPageProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/GameObjectCreator.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/GameObjectCreator.gui index eb2bf15e6..b49d2fb4d 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/GameObjectCreator.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/GameObjectCreator.gui @@ -100,7 +100,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -123,7 +123,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -147,7 +147,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "Canvas.pushDialog(AssetBrowser_addModule);\nAssetBrowser_addModuleWindow.selectWindow();"; @@ -176,7 +176,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -203,7 +203,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui index 45cb15e73..a6002f35e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui @@ -168,7 +168,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -195,7 +195,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -365,7 +365,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -392,7 +392,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -416,7 +416,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "Canvas.pushDialog(AssetBrowser_addModule);\nAssetBrowser_addModuleWindow.selectWindow();"; @@ -441,7 +441,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -468,7 +468,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -492,7 +492,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "ImportAssetConfigEditorWindow.addNewConfig();"; @@ -518,7 +518,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "ImportAssetConfigEditorWindow.editConfig();"; @@ -544,7 +544,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "ImportAssetConfigEditorWindow.deleteConfig();"; @@ -655,7 +655,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -682,7 +682,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/editAsset.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/editAsset.gui index 483fe0d80..ba2e61540 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/editAsset.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/editAsset.gui @@ -112,7 +112,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsuiButtonProfile"; visible = "1"; active = "1"; command = "AssetBrowser_editAsset.saveAsset();"; @@ -132,7 +132,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "Canvas.popDialog(AssetBrowser_editAsset);"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/editModule.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/editModule.gui index dbe060f62..23d0fd616 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/editModule.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/editModule.gui @@ -64,8 +64,8 @@ position = "1 21"; extent = "498 283"; minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; + horizSizing = "width"; + vertSizing = "height"; profile = "ToolsGuiScrollProfile"; visible = "1"; active = "1"; @@ -75,7 +75,7 @@ canSave = "1"; canSaveDynamicFields = "0"; - new GuiInspector(ModuleEditInspector) { + new GuiVariableInspector(ModuleEditInspector) { dividerMargin = "5"; showCustomFields = "1"; stackingType = "Vertical"; @@ -90,8 +90,8 @@ position = "1 1"; extent = "481 101"; minExtent = "16 16"; - horizSizing = "right"; - vertSizing = "bottom"; + horizSizing = "width"; + vertSizing = "height"; profile = "GuiInspectorProfile"; visible = "1"; active = "1"; @@ -111,8 +111,8 @@ extent = "45 22"; minExtent = "8 2"; horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "AssetBrowser_editModule.saveModule();"; @@ -131,8 +131,8 @@ extent = "45 22"; minExtent = "8 2"; horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiButtonProfile"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "Canvas.popDialog(AssetBrowser_editModule);"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui index 379d6a521..9fcecbb2e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui @@ -99,7 +99,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -126,7 +126,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -151,7 +151,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "Canvas.pushDialog(AssetBrowser_AddModule);\nAssetBrowser_addModuleWindow.selectWindow();"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui index 65896dccc..37e6fc4a1 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui @@ -59,7 +59,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -86,7 +86,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -138,7 +138,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -165,7 +165,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -188,7 +188,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -215,7 +215,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; command = "NewAssetTypeList.onSelected();"; @@ -243,7 +243,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -266,7 +266,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -293,7 +293,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -316,7 +316,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -380,7 +380,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui index 7ee77dbc0..ed907fbd9 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui @@ -63,7 +63,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -89,7 +89,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui index 055763d35..c31dbf53e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui @@ -63,7 +63,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiPopupMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -89,7 +89,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/main.cs b/Templates/BaseGame/game/tools/assetBrowser/main.cs index 8a5051599..9ba71c91b 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/main.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/main.cs @@ -68,7 +68,10 @@ function initializeAssetBrowser() exec("./scripts/assetTypes/stateMachine.cs"); exec("./scripts/assetTypes/cubemap.cs"); - exec("./scripts/fieldTypes.cs"); + exec("./scripts/fieldTypes/fieldTypes.cs"); + exec("./scripts/fieldTypes/listField.cs"); + exec("./scripts/fieldTypes/moduleDependencies.cs"); + exec("./scripts/fieldTypes/assetDependencies.cs"); new ScriptObject( AssetBrowserPlugin ) { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.cs index a5c04da64..f5ac02bc8 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.cs @@ -57,18 +57,6 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this) Extension = "asset.taml"; Recurse = true; }; - - //Autoload the usual suspects - new AutoloadAssets() - { - AssetType = "ComponentAsset"; - Recurse = true; - }; - new AutoloadAssets() - { - AssetType = "GUIAsset"; - Recurse = true; - }; }; TAMLWrite(%newModule, %moduleDefinitionFilePath); @@ -100,16 +88,6 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this) warnf("CreateNewModule - Something went wrong and we couldn't write the script file!"); } - - if(%file.openForWrite(%moduleScriptFilePath)) - { - %file.writeline("function " @ %newModuleName @ "::onCreate(%this)\n{\n\n}\n"); - %file.writeline("function " @ %newModuleName @ "::onDestroy(%this)\n{\n\n}\n"); - - //todo, pre-write any event functions of interest - - %file.close(); - } //force a refresh of our modules list ModuleDatabase.ignoreLoadedGroups(true); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.cs index 271b3b414..2cf6ed252 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.cs @@ -7,12 +7,16 @@ function AssetBrowser::createPostEffectAsset(%this) %tamlpath = %modulePath @ "/postFXs/" @ %assetName @ ".asset.taml"; %scriptPath = %modulePath @ "/postFXs/" @ %assetName @ ".cs"; + %hlslPath = %modulePath @ "/postFXs/" @ %assetName @ "P.hlsl"; + %glslPath = %modulePath @ "/postFXs/" @ %assetName @ "P.glsl"; %asset = new PostEffectAsset() { AssetName = %assetName; versionId = 1; scriptFile = %assetName @ ".cs"; + hlslShader = %assetName @ "P.hlsl"; + glslShader = %assetName @ "P.glsl"; }; TamlWrite(%asset, %tamlpath); @@ -54,6 +58,56 @@ function AssetBrowser::createPostEffectAsset(%this) warnf("CreatePostFXAsset - Something went wrong and we couldn't write the PostFX script file!"); } + //hlsl shader + %postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFileP.hlsl.template"; + + if(%file.openForWrite(%hlslPath) && %templateFile.openForRead(%postFXTemplateCodeFilePath)) + { + while( !%templateFile.isEOF() ) + { + %line = %templateFile.readline(); + %line = strreplace( %line, "@@", %assetName ); + + %file.writeline(%line); + echo(%line); + } + + %file.close(); + %templateFile.close(); + } + else + { + %file.close(); + %templateFile.close(); + + warnf("CreatePostFXAsset - Something went wrong and we couldn't write the PostFX hlsl file!"); + } + + //glsl shader + %postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFileP.glsl.template"; + + if(%file.openForWrite(%glslPath) && %templateFile.openForRead(%postFXTemplateCodeFilePath)) + { + while( !%templateFile.isEOF() ) + { + %line = %templateFile.readline(); + %line = strreplace( %line, "@@", %assetName ); + + %file.writeline(%line); + echo(%line); + } + + %file.close(); + %templateFile.close(); + } + else + { + %file.close(); + %templateFile.close(); + + warnf("CreatePostFXAsset - Something went wrong and we couldn't write the PostFX glsl file!"); + } + return %tamlpath; } diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs new file mode 100644 index 000000000..809c3166f --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs @@ -0,0 +1,53 @@ +function AssetBrowser::createTerrainAsset(%this) +{ +} + +function AssetBrowser::editTerrainAsset(%this, %assetDef) +{ +} + +function AssetBrowser::duplicateTerrainAsset(%this, %assetDef, %targetModule) +{ +} + +function AssetBrowser::importTerrainAsset(%this, %assetDef) +{ +} + +function AssetBrowser::dragAndDropTerrainAsset(%this, %assetDef, %dropTarget) +{ + if(!isObject(%dropTarget)) + return; +} + +function AssetBrowser::renameTerrainAsset(%this, %assetDef, %newAssetId, %originalName, %newName) +{ +} + +function AssetBrowser::deleteTerrainAsset(%this, %assetDef) +{ +} + +function AssetBrowser::buildTerrainAssetPreview(%this, %assetDef, %previewData) +{ + %previewData.assetName = %assetDef.assetName; + %previewData.assetPath = ""; + %previewData.doubleClickCommand = ""; + + %previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon"; + + %previewData.assetFriendlyName = %assetDef.gameObjectName; + %previewData.assetDesc = %assetDef.description; + %previewData.tooltip = %assetDef.gameObjectName; +} + +function GuiInspectorTypeTerrainAssetPtr::onClick( %this, %fieldName ) +{ + //Get our data + %obj = %this.getInspector().getInspectObject(0); +} + +function GuiInspectorTypeTerrainAssetPtr::onControlDropped( %this, %payload, %position ) +{ + +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs new file mode 100644 index 000000000..d6a8488f7 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs @@ -0,0 +1,53 @@ +function AssetBrowser::createTerrainMaterialAsset(%this) +{ +} + +function AssetBrowser::editTerrainMaterialAsset(%this, %assetDef) +{ +} + +function AssetBrowser::duplicateTerrainMaterialAsset(%this, %assetDef, %targetModule) +{ +} + +function AssetBrowser::importTerrainMaterialAsset(%this, %assetDef) +{ +} + +function AssetBrowser::dragAndDropTerrainMaterialAsset(%this, %assetDef, %dropTarget) +{ + if(!isObject(%dropTarget)) + return; +} + +function AssetBrowser::renameTerrainMaterialAsset(%this, %assetDef, %newAssetId, %originalName, %newName) +{ +} + +function AssetBrowser::deleteTerrainMaterialAsset(%this, %assetDef) +{ +} + +function AssetBrowser::buildTerrainMaterialAssetPreview(%this, %assetDef, %previewData) +{ + %previewData.assetName = %assetDef.assetName; + %previewData.assetPath = ""; + %previewData.doubleClickCommand = ""; + + %previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon"; + + %previewData.assetFriendlyName = %assetDef.gameObjectName; + %previewData.assetDesc = %assetDef.description; + %previewData.tooltip = %assetDef.gameObjectName; +} + +function GuiInspectorTypeTerrainMaterialAssetPtr::onClick( %this, %fieldName ) +{ + //Get our data + %obj = %this.getInspector().getInspectObject(0); +} + +function GuiInspectorTypeTerrainMaterialAssetPtr::onControlDropped( %this, %payload, %position ) +{ + +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.cs index 996bec6f0..bec594ba9 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.cs @@ -82,23 +82,40 @@ function AssetBrowser::editModuleInfo(%this) AssetBrowser.tempModule = new ModuleDefinition(); AssetBrowser.tempModule.assignFieldsFrom(%moduleDef); - ModuleEditInspector.inspect(AssetBrowser.tempModule); AssetBrowser_editModule.editedModuleId = AssetBrowser.selectedModule; AssetBrowser_editModule.editedModule = AssetBrowser.tempModule; - //remove some of the groups we don't need: - for(%i=0; %i < ModuleEditInspector.getCount(); %i++) - { - %caption = ModuleEditInspector.getObject(%i).caption; - - if(%caption $= "BuildId" || %caption $= "type" || %caption $= "Dependencies" || %caption $= "scriptFile" - || %caption $= "AssetTagsManifest" || %caption $= "ScopeSet" || %caption $= "ModulePath" - || %caption $= "ModuleFile" || %caption $= "ModuleFilePath" || %caption $= "ModuleScriptFilePath" ) - { - ModuleEditInspector.remove(ModuleEditInspector.getObject(%i)); - %i--; - } - } + /// Module configuration. + ModuleEditInspector.startGroup("General"); + ModuleEditInspector.addField("ModuleId", "ModuleId", "string", "", AssetBrowser.tempModule.ModuleId, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("VersionId", "VersionId", "string", "", AssetBrowser.tempModule.VersionId, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("BuildId", "BuildId", "string", "", AssetBrowser.tempModule.BuildId, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("enabled", "enabled", "bool", "", AssetBrowser.tempModule.enabled, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("Description", "Description", "command", "", AssetBrowser.tempModule.Description, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("Group", "Group", "string", "", AssetBrowser.tempModule.Group, "", AssetBrowser.tempModule); + ModuleEditInspector.endGroup(); + + ModuleEditInspector.startGroup("Management"); + ModuleEditInspector.addField("Synchronized", "Synchronized", "bool", "", AssetBrowser.tempModule.Synchronized, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("Deprecated", "Deprecated", "bool", "", AssetBrowser.tempModule.Deprecated, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("CriticalMerge", "CriticalMerge", "bool", "", AssetBrowser.tempModule.CriticalMerge, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("OverrideExistingObjects", "OverrideExistingObjects", "bool", "", AssetBrowser.tempModule.OverrideExistingObjects, "", AssetBrowser.tempModule); + ModuleEditInspector.endGroup(); + + ModuleEditInspector.startGroup("Meta"); + ModuleEditInspector.addField("Author", "Author", "string", "", AssetBrowser.tempModule.Author, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("Type", "Type", "string", "", AssetBrowser.tempModule.Type, "", AssetBrowser.tempModule); + ModuleEditInspector.endGroup(); + + ModuleEditInspector.startGroup("Script"); + ModuleEditInspector.addField("ScriptFile", "ScriptFile", "string", "", AssetBrowser.tempModule.ScriptFile, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("CreateFunction", "CreateFunction", "string", "", AssetBrowser.tempModule.CreateFunction, "", AssetBrowser.tempModule); + ModuleEditInspector.addField("DestroyFunction", "DestroyFunction", "string", "", AssetBrowser.tempModule.DestroyFunction, "", AssetBrowser.tempModule); + ModuleEditInspector.endGroup(); + + ModuleEditInspector.startGroup("Dependencies"); + ModuleEditInspector.addField("ModuleDependencies", "Module Dependencies", "ModuleDependenciesButton", "", "", "", AssetBrowser.tempModule); + ModuleEditInspector.endGroup(); } function AssetBrowser::renameModule(%this) diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/assetDependencies.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/assetDependencies.cs new file mode 100644 index 000000000..3aaf4f73a --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/assetDependencies.cs @@ -0,0 +1,92 @@ + +function GuiInspectorVariableGroup::buildAssetDependenciesField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %extent = 200; + + %fieldCtrl = %this.createInspectorField(); + + %extent = %this.stack.getExtent(); + + %width = mRound(%extent/2); + %height = 20; + %inset = 10; + + %editControl = new GuiPopUpMenuCtrl() { + class = "guiInspectorListField"; + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + Position = %fieldCtrl.edit.position; + Extent = %fieldCtrl.edit.extent; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + tooltip = %tooltip; + text = %fieldDefaultVal; + hovertime = "1000"; + ownerObject = %ownerObj; + fieldName = %fieldName; + callbackName = %callbackName; + }; + + //set the field value + if(getSubStr(%this.fieldName, 0, 1) $= "$") + { + if(%fieldName $= "") + %editControl.setText(%fieldName); + } + else if(isObject(%ownerObj)) + { + //regular variable + %setCommand = %editControl @ ".setText(" @ %ownerObj @ "." @ %fieldName @ ");"; + eval(%setCommand); + } + + %listCount = getTokenCount(%fieldDataVals, ","); + + for(%i=0; %i < %listCount; %i++) + { + %entryText = getToken(%fieldDataVals, ",", %i); + %editControl.add(%entryText); + } + + %fieldCtrl.setCaption(%fieldLabel); + %fieldCtrl.setEditControl(%editControl); + + //echo("GuiInspectorListField - " @ %editControl.getID() @ " - " @ %fieldName); + + %this.addInspectorField(%fieldCtrl); +} + +function guiInspectorListField::onSelect( %this, %id, %text ) +{ + if(getSubStr(%this.fieldName, 0, 1) $= "$") + { + //ah, a global var, just do it straight, then + %setCommand = %this.fieldName @ " = \"" @ %text @ "\";"; + } + else if(isObject(%this.ownerObj)) + { + //regular variable + %setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %text @ "\";"; + } + else if(%this.callbackName !$= "") + { + %setCommand = %this.callbackName @ "(\"" @ %this.fieldName @ "\",\"" @ %text @"\");"; + } + + eval(%setCommand); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/fieldTypes.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/fieldTypes.cs new file mode 100644 index 000000000..3a2fc9069 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/fieldTypes.cs @@ -0,0 +1,12 @@ +function GuiVariableInspector::onInspectorFieldModified(%this, %targetObj, %fieldName, %index, %oldValue, %newValue) +{ + echo("FIELD CHANGED: " @ %fieldName @ " from " @ %oldValue @ " to " @ %newValue); +} + +function GuiInspectorVariableGroup::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeName, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %inspector = %this.getParent(); + %makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @ + %fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");"; + eval(%makeCommand); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/listField.cs similarity index 80% rename from Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes.cs rename to Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/listField.cs index 0417e4c66..a1cec2dff 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/listField.cs @@ -1,15 +1,3 @@ -function GuiVariableInspector::onInspectorFieldModified(%this, %targetObj, %fieldName, %index, %oldValue, %newValue) -{ - echo("FIELD CHANGED: " @ %fieldName @ " from " @ %oldValue @ " to " @ %newValue); -} - -function GuiInspectorVariableGroup::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeName, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) -{ - %inspector = %this.getParent(); - %makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @ - %fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");"; - eval(%makeCommand); -} function GuiInspectorVariableGroup::buildListField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) { @@ -110,7 +98,7 @@ function GuiInspectorVariableGroup::buildListField(%this, %fieldName, %fieldLabe %fieldCtrl.setCaption(%fieldLabel); %fieldCtrl.setEditControl(%editControl); - echo("GuiInspectorListField - " @ %editControl.getID() @ " - " @ %fieldName); + //echo("GuiInspectorListField - " @ %editControl.getID() @ " - " @ %fieldName); %this.addInspectorField(%fieldCtrl); } diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/moduleDependencies.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/moduleDependencies.cs new file mode 100644 index 000000000..2b4432a7b --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/fieldTypes/moduleDependencies.cs @@ -0,0 +1,39 @@ + +function GuiInspectorVariableGroup::buildModuleDependenciesButtonField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %extent = %this.stack.getExtent(); + + %width = mRound(%extent/2); + %height = 20; + + %button = new GuiButtonCtrl() + { + extent = %extent.x SPC %height; + text = "Edit Module Dependencies"; + class = "ModuleDependenciesButton"; + profile = "ToolsGuiButtonProfile"; + }; + + %this.stack.add(%button); +} + +function ModuleDependenciesButton::onClick( %this ) +{ + /*if(getSubStr(%this.fieldName, 0, 1) $= "$") + { + //ah, a global var, just do it straight, then + %setCommand = %this.fieldName @ " = \"" @ %text @ "\";"; + } + else if(isObject(%this.ownerObj)) + { + //regular variable + %setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %text @ "\";"; + } + else if(%this.callbackName !$= "") + { + %setCommand = %this.callbackName @ "(\"" @ %this.fieldName @ "\",\"" @ %text @"\");"; + } + + eval(%setCommand);*/ + echo("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/postFXFile.cs.template b/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/postFXFile.cs.template index 3be04b347..dd43f4b05 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/postFXFile.cs.template +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/postFXFile.cs.template @@ -61,6 +61,12 @@ function @@::preProcess( %this ) { } +function @@::onAdd(%this) +{ + //Register the postFX with the manager + PostFXManager.registerPostEffect(%this); +} + function @@::onEnabled( %this ) { return true; @@ -70,6 +76,36 @@ function @@::onDisabled( %this ) { } +//This is used to populate the PostFXEditor's settings so the post FX can be edited +//This is automatically polled for any postFX that has been registered(in our onAdd) and the settings +//are thus exposed for editing +function @@::populatePostFXSettings(%this) +{ + PostEffectEditorInspector.startGroup("@@ - General"); + PostEffectEditorInspector.addField("$PostFXManager::Settings::Enabled@@", "Enabled", "bool", "", $PostFXManager::PostFX::Enable@@, ""); + PostEffectEditorInspector.endGroup(); +} + +//This function pair(applyFromPreset and settingsApply) are done the way they are, with the separated variables +//so that we can effectively store the 'settings' away from the live variables that the postFX's actually utilize +//when rendering. This allows us to modify things but still leave room for reverting or temporarily applying them +function @@::applyFromPreset(%this) +{ + //@@ Settings + $PostFXManager::PostFX::Enable@@ = $PostFXManager::Settings::Enabled@@; + + if($PostFXManager::PostFX::Enable@@) + %this.enable(); + else + %this.disable(); +} + +function @@::settingsApply(%this) +{ + $PostFXManager::Settings::Enabled@@ = $PostFXManager::PostFX::Enable@@; +} + +//Our actual postFX singleton PostEffect( @@ ) { isEnabled = false; diff --git a/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.cs b/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.cs index 65c338dd7..6a2de3108 100644 --- a/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.cs +++ b/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.cs @@ -161,7 +161,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel %resetButton = new GuiButtonCtrl() { canSaveDynamicFields = "0"; className = "materialFieldBtn"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "100 75"; @@ -179,7 +179,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel %editMatButton = new GuiButtonCtrl() { canSaveDynamicFields = "0"; className = "materialFieldBtn"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = %resetButton.position.x + (%extent * 0.3) + 6 SPC "75"; diff --git a/Templates/BaseGame/game/tools/componentEditor/interface/stateMachineField.cs b/Templates/BaseGame/game/tools/componentEditor/interface/stateMachineField.cs index b6b31380f..796c2486b 100644 --- a/Templates/BaseGame/game/tools/componentEditor/interface/stateMachineField.cs +++ b/Templates/BaseGame/game/tools/componentEditor/interface/stateMachineField.cs @@ -110,7 +110,7 @@ function StateMachineEditor::addField(%this, %stateName) %fieldList = new GuiPopUpMenuCtrlEx() { class = "stateMachineFieldList"; - Profile = "GuiPopupMenuProfile"; + Profile = "ToolsGuiPopupMenuProfile"; HorizSizing = "width"; VertSizing = "bottom"; position = "0 1"; @@ -159,7 +159,7 @@ function stateMachineFieldList::onSelect(%this) %fieldCtrl = new GuiPopUpMenuCtrlEx() { class = "stateMachineFieldList"; - Profile = "GuiPopupMenuProfile"; + Profile = "ToolsGuiPopupMenuProfile"; HorizSizing = "width"; VertSizing = "bottom"; position = "124 1"; @@ -171,7 +171,7 @@ function stateMachineFieldList::onSelect(%this) %fieldCtrl = new GuiPopUpMenuCtrlEx() { class = "stateMachineFieldList"; - Profile = "GuiPopupMenuProfile"; + Profile = "ToolsGuiPopupMenuProfile"; HorizSizing = "width"; VertSizing = "bottom"; position = "124 1"; diff --git a/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.cs b/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.cs index 94013ed36..c136bb4bf 100644 --- a/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.cs +++ b/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.cs @@ -45,7 +45,7 @@ function GuiInspectorEntityGroup::createAddComponentList(%this) %componentList = new GuiPopUpMenuCtrlEx(QuickEditComponentList) { - Profile = "GuiPopupMenuProfile"; + Profile = "ToolsGuiPopupMenuProfile"; HorizSizing = "width"; VertSizing = "bottom"; position = "28 4"; diff --git a/Templates/BaseGame/game/tools/convexEditor/convexEditorSidebarGui.gui b/Templates/BaseGame/game/tools/convexEditor/convexEditorSidebarGui.gui index 64bdc13f8..8fbc97464 100644 --- a/Templates/BaseGame/game/tools/convexEditor/convexEditorSidebarGui.gui +++ b/Templates/BaseGame/game/tools/convexEditor/convexEditorSidebarGui.gui @@ -443,7 +443,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -495,7 +495,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -586,7 +586,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -638,7 +638,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -691,7 +691,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui index d55bcc45c..e8c3b5adb 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui +++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui @@ -187,7 +187,7 @@ horizSizing = "right"; vertSizing = "bottom"; fixedAspectRatio = "0"; - profile = "GuiPopUpMenuProfile"; + profile = "ToolsGuiPopUpMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "ToolsGuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui index b8dce9bd2..5a68c4df2 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui +++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui @@ -151,7 +151,7 @@ AnchorLeft = "1"; AnchorRight = "0"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "width"; VertSizing = "bottom"; position = "4 23"; diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui index 49a819840..62d7de3b8 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui +++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui @@ -95,7 +95,7 @@ new GuiTextEditCtrl( DatablockEditorTreeFilter ) { position = "2 4"; extent = "180 18"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; horizSizing = "width"; vertSizing = "bottom"; class = "GuiTreeViewFilterText"; diff --git a/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui b/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui index c203ca52e..0d4f7a975 100644 --- a/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui +++ b/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui @@ -214,7 +214,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; Clickable = "1"; @@ -252,7 +252,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; Clickable = "1"; @@ -572,7 +572,7 @@ extent = "116 18"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; tooltipProfile = "GuiToolTipProfile"; tooltip = "Hex representation of Red, Green, Blue Color value."; command = "$thisControl.onKeyDown();"; diff --git a/Templates/BaseGame/game/tools/gui/images/button.png b/Templates/BaseGame/game/tools/gui/images/button.png index 79c3e391b..5a676fe70 100644 Binary files a/Templates/BaseGame/game/tools/gui/images/button.png and b/Templates/BaseGame/game/tools/gui/images/button.png differ diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.ed.gui index 5fa0093da..a65acf0b0 100644 --- a/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.ed.gui +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.ed.gui @@ -40,7 +40,7 @@ anchorLeft = "1"; anchorRight = "0"; isContainer = "0"; - profile = "GuiMLTextProfile"; + profile = "ToolsGuiMLTextProfile"; horizSizing = "center"; vertSizing = "bottom"; position = "9 26"; @@ -76,7 +76,7 @@ anchorLeft = "1"; anchorRight = "0"; isContainer = "0"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; horizSizing = "right"; vertSizing = "bottom"; position = "5 5"; @@ -101,7 +101,7 @@ anchorLeft = "1"; anchorRight = "0"; isContainer = "0"; - profile = "GuiPopUpMenuProfile"; + profile = "ToolsGuiPopUpMenuProfile"; horizSizing = "width"; vertSizing = "bottom"; position = "115 5"; @@ -120,7 +120,7 @@ buttonType = "PushButton"; useMouseEvents = "0"; isContainer = "0"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; horizSizing = "width"; vertSizing = "top"; position = "7 85"; @@ -140,7 +140,7 @@ buttonType = "PushButton"; useMouseEvents = "0"; isContainer = "0"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; horizSizing = "left"; vertSizing = "top"; position = "170 85"; diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui index 52e119ea6..34342467a 100644 --- a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui @@ -10,7 +10,7 @@ helpTag = "0"; new GuiWindowCtrl(MBOKFrame) { - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; horizSizing = "center"; vertSizing = "center"; position = "170 175"; @@ -29,7 +29,7 @@ text = ""; new GuiMLTextCtrl(MBOKText) { - profile = "GuiMLTextProfile"; + profile = "ToolsGuiMLTextProfile"; horizSizing = "center"; vertSizing = "bottom"; position = "9 35"; @@ -42,7 +42,7 @@ maxChars = "-1"; }; new GuiButtonCtrl() { - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; horizSizing = "right"; vertSizing = "top"; position = "111 75"; diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui index 5f9c8f5dc..fb993062d 100644 --- a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui @@ -10,7 +10,7 @@ helpTag = "0"; new GuiWindowCtrl(MBOKCancelFrame) { - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; horizSizing = "center"; vertSizing = "center"; position = "170 175"; @@ -29,7 +29,7 @@ text = ""; new GuiMLTextCtrl(MBOKCancelText) { - profile = "GuiMLTextProfile"; + profile = "ToolsGuiMLTextProfile"; horizSizing = "center"; vertSizing = "bottom"; position = "8 34"; @@ -43,7 +43,7 @@ }; new GuiButtonCtrl() { - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; horizSizing = "right"; vertSizing = "top"; position = "66 68"; @@ -57,7 +57,7 @@ simpleStyle = "0"; }; new GuiButtonCtrl() { - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; horizSizing = "right"; vertSizing = "top"; position = "156 68"; diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui index c6c95a821..6370f1eee 100644 --- a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui @@ -13,7 +13,7 @@ new GuiWindowCtrl(MBOKCancelDetailsFrame) { canSaveDynamicFields = "0"; - Profile = "GuiWindowProfile"; + Profile = "ToolsGuiWindowProfile"; HorizSizing = "center"; VertSizing = "center"; position = "362 219"; @@ -34,7 +34,7 @@ new GuiMLTextCtrl(MBOKCancelDetailsText) { canSaveDynamicFields = "0"; - Profile = "GuiMLTextProfile"; + Profile = "ToolsGuiMLTextProfile"; HorizSizing = "center"; VertSizing = "bottom"; position = "32 39"; @@ -49,7 +49,7 @@ }; new GuiButtonCtrl() { canSaveDynamicFields = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "top"; position = "158 273"; @@ -66,7 +66,7 @@ }; new GuiButtonCtrl() { canSaveDynamicFields = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "top"; position = "30 273"; @@ -83,7 +83,7 @@ }; new GuiButtonCtrl(MBOKCancelDetailsButton) { canSaveDynamicFields = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "top"; position = "9 302"; @@ -118,7 +118,7 @@ new GuiMLTextCtrl(MBOKCancelDetailsInfoText) { canSaveDynamicFields = "0"; - Profile = "GuiMLTextProfile"; + Profile = "ToolsGuiMLTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "2 2"; diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui index 3cd7d18ef..0c83e2039 100644 --- a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui @@ -10,7 +10,7 @@ helpTag = "0"; new GuiWindowCtrl(MBYesNoFrame) { - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; horizSizing = "center"; vertSizing = "center"; position = "170 175"; @@ -30,7 +30,7 @@ closeCommand = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);"; new GuiMLTextCtrl(MBYesNoText) { - profile = "GuiMLTextProfile"; + profile = "ToolsGuiMLTextProfile"; horizSizing = "center"; vertSizing = "bottom"; position = "11 38"; @@ -43,7 +43,7 @@ maxChars = "-1"; }; new GuiButtonCtrl() { - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; horizSizing = "right"; vertSizing = "top"; position = "70 68"; @@ -57,7 +57,7 @@ simpleStyle = "0"; }; new GuiButtonCtrl() { - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; horizSizing = "right"; vertSizing = "top"; position = "167 68"; diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui index 03257494d..b14d11990 100644 --- a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui @@ -13,7 +13,7 @@ new GuiWindowCtrl(MBYesNoCancelFrame) { canSaveDynamicFields = "0"; - Profile = "GuiWindowProfile"; + Profile = "ToolsGuiWindowProfile"; HorizSizing = "center"; VertSizing = "center"; position = "250 235"; @@ -35,7 +35,7 @@ new GuiMLTextCtrl(MBYesNoCancelText) { canSaveDynamicFields = "0"; - Profile = "GuiMLTextProfile"; + Profile = "ToolsGuiMLTextProfile"; HorizSizing = "center"; VertSizing = "bottom"; position = "7 38"; @@ -50,7 +50,7 @@ }; new GuiButtonCtrl() { canSaveDynamicFields = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "top"; position = "7 71"; @@ -67,7 +67,7 @@ }; new GuiButtonCtrl() { canSaveDynamicFields = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "top"; position = "92 71"; @@ -83,7 +83,7 @@ }; new GuiButtonCtrl() { canSaveDynamicFields = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "top"; position = "213 71"; diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messagePopup.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messagePopup.ed.gui index 806f12204..317bbc7d1 100644 --- a/Templates/BaseGame/game/tools/gui/messageBoxes/messagePopup.ed.gui +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messagePopup.ed.gui @@ -10,7 +10,7 @@ helpTag = "0"; new GuiWindowCtrl(MessagePopFrame) { - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; horizSizing = "center"; vertSizing = "center"; position = "170 175"; @@ -29,7 +29,7 @@ minSize = "50 50"; new GuiMLTextCtrl(MessagePopText) { - profile = "GuiMLTextProfile"; + profile = "ToolsGuiMLTextProfile"; horizSizing = "center"; vertSizing = "bottom"; position = "32 39"; diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.cs b/Templates/BaseGame/game/tools/gui/postFxEditor.cs new file mode 100644 index 000000000..f2e3f603b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/postFxEditor.cs @@ -0,0 +1,50 @@ +function PostFXEditor::onDialogPush( %this ) +{ + //Apply the settings to the controls + postVerbose("% - PostFX Editor - Loading GUI."); + + %this.initialOpen = true; + %this.refresh(); +} + +function PostFXEditor::refresh(%this) +{ + PostEffectEditorInspector.clearFields(); + + %count = PostFXManager.Count(); + for(%i=0; %i < %count; %i++) + { + %postEffect = PostFXManager.getKey(%i); + + if(isObject(%postEffect) && %postEffect.isMethod("populatePostFXSettings")) + { + %postEffect.populatePostFXSettings(); + } + } + + //First time we open it this 'session', we'll go ahead and collapse the groups + //so it's not too visually busy + if(%this.initialOpen) + PostEffectEditorInspector.setGroupsExpanded(false); + + %this.initialOpen = false; +} + +function PostFXEditor::apply(%this) +{ + %count = PostFXManager.Count(); + for(%i=0; %i < %count; %i++) + { + %postEffect = PostFXManager.getKey(%i); + + if(isObject(%postEffect) && %postEffect.isMethod("applyFromPreset")) + { + %postEffect.applyFromPreset(); + } + } +} + +function PostFXEditor::revert(%this) +{ + PostFXManager::loadPresetHandler($PostFXManager::currentPreset); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.gui b/Templates/BaseGame/game/tools/gui/postFxEditor.gui new file mode 100644 index 000000000..5ee336536 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/postFxEditor.gui @@ -0,0 +1,205 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(postFXEditor) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + + new DbgFileView() { + position = "0 0"; + extent = "8 2"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiWindowCtrl(ppOptionsWindow) { + text = "PostFX Editor"; + resizeWidth = "1"; + resizeHeight = "1"; + canMove = "1"; + canClose = "1"; + canMinimize = "0"; + canMaximize = "0"; + canCollapse = "0"; + closeCommand = "Canvas.popDialog(PostFXEditor);"; + edgeSnap = "0"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "306 54"; + extent = "411 615"; + minExtent = "8 8"; + horizSizing = "center"; + vertSizing = "center"; + profile = "ToolsGuiWindowProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiScrollCtrl() { + willFirstRespond = "1"; + hScrollBar = "dynamic"; + vScrollBar = "dynamic"; + lockHorizScroll = "0"; + lockVertScroll = "0"; + constantThumbHeight = "0"; + childMargin = "0 0"; + mouseWheelScrollSpeed = "-1"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "3 23"; + extent = "405 558"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiScrollProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiVariableInspector(PostEffectEditorInspector) { + dividerMargin = "5"; + showCustomFields = "1"; + stackingType = "Vertical"; + horizStacking = "Left to Right"; + vertStacking = "Top to Bottom"; + padding = "1"; + dynamicSize = "1"; + dynamicNonStackExtent = "0"; + dynamicPos = "0"; + changeChildSizeToFit = "1"; + changeChildPosition = "1"; + position = "1 1"; + extent = "388 416"; + minExtent = "16 16"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiButtonCtrl(ppOptionsApply) { + text = "Apply"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "309 587"; + extent = "93 23"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "PostFXEditor.apply(); Canvas.popDialog(PostFXEditor);"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Apply the settings and close this dialog"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ppOptionsSavePreset) { + text = "Save Preset..."; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "111 587"; + extent = "93 23"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "PostFXManager.savePresetFile();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Save the preset to a file to disk for later use (use postfx::applyPreset)"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ppOptionsLoadPreset) { + text = "Load Preset..."; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "12 587"; + extent = "93 23"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "PostFXManager.loadPresetFile();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Load a post FX preset file from disk"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ppOptionsOk1) { + text = "Revert"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "210 587"; + extent = "93 23"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "PostFXEditor.revert(); PostFXEditor.refresh();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Revert any changes made since opening the dialog"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/gui/profilerGraph.gui b/Templates/BaseGame/game/tools/gui/profilerGraph.gui index a008c227a..8e2e2b68f 100644 --- a/Templates/BaseGame/game/tools/gui/profilerGraph.gui +++ b/Templates/BaseGame/game/tools/gui/profilerGraph.gui @@ -36,7 +36,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -65,7 +65,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTabBookProfile"; + profile = "ToolsGuiTabBookProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -89,7 +89,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTabPageProfile"; + profile = "ToolsGuiTabPageProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -128,7 +128,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -151,7 +151,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -174,7 +174,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -197,7 +197,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -297,7 +297,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -316,7 +316,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -335,7 +335,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -354,7 +354,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/gui/profiles.ed.cs b/Templates/BaseGame/game/tools/gui/profiles.ed.cs index 18bbabf42..20425548c 100644 --- a/Templates/BaseGame/game/tools/gui/profiles.ed.cs +++ b/Templates/BaseGame/game/tools/gui/profiles.ed.cs @@ -275,6 +275,8 @@ new GuiControlProfile( ToolsGuiTextEditProfile ) //borderColor = "100 100 100"; fillColor = EditorSettings.value("Theme/fieldBGColor"); fillColorHL = EditorSettings.value("Theme/fieldBGHLColor"); + fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor"); + fontColor = EditorSettings.value("Theme/fieldTextColor"); fontColorHL = EditorSettings.value("Theme/fieldTextHLColor"); fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor"); @@ -332,7 +334,7 @@ new GuiControlProfile( ToolsGuiButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "./images/button"; + bitmap = "tools/gui/images/button"; hasBitmapArray = false; category = "Tools"; }; @@ -503,10 +505,13 @@ new GuiControlProfile( ToolsGuiPopUpMenuDefault : ToolsGuiDefaultProfile ) fillColor = EditorSettings.value("Theme/fieldBGColor");//"255 255 255";//100 fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");//"91 101 116"; fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");//"91 101 116"; + // font color is black fontColor = EditorSettings.value("Theme/fieldTextColor");//"215 215 215"; fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");//"215 215 215"; fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");//"215 215 215"; + fontColorNA = EditorSettings.value("Theme/fieldTextColor");//"215 215 215"; + borderColor = EditorSettings.value("Theme/dividerDarkColor"); category = "Tools"; }; @@ -551,7 +556,7 @@ new GuiControlProfile( ToolsGuiListBoxProfile ) { fillColorHL = EditorSettings.value("Theme/windowBackgroundColor"); fillColorNA = EditorSettings.value("Theme/windowBackgroundColor"); - fontColor = EditorSettings.value("Theme/headerTextColor"); + fontColor = EditorSettings.value("Theme/fieldTextColor"); fontColorHL = EditorSettings.value("Theme/fieldTextHLColor"); fontColorNA = EditorSettings.value("Theme/fieldTextSELColor"); diff --git a/Templates/BaseGame/game/tools/levels/BlankRoom.mis b/Templates/BaseGame/game/tools/levels/BlankRoom.mis index 7e1243a8d..95f017dfd 100644 --- a/Templates/BaseGame/game/tools/levels/BlankRoom.mis +++ b/Templates/BaseGame/game/tools/levels/BlankRoom.mis @@ -2,12 +2,15 @@ new Scene(EditorTemplateLevel) { canSave = "1"; canSaveDynamicFields = "1"; + isSubScene = "0"; + isEditing = "0"; + isDirty = "0"; cdTrack = "2"; CTF_scoreLimit = "5"; - enabled = "1"; + Enabled = "1"; musicTrack = "lush"; - new LevelInfo(TheLevelInfo) { + new LevelInfo(theLevelInfo) { nearClip = "0.1"; visibleDistance = "1000"; visibleGhostDistance = "0"; @@ -19,14 +22,14 @@ new Scene(EditorTemplateLevel) { canvasClearColor = "0 0 0 255"; ambientLightBlendPhase = "1"; ambientLightBlendCurve = "0 0 -1 -1"; - advancedLightmapSupport = "0"; soundAmbience = "AudioAmbienceDefault"; soundDistanceModel = "Linear"; canSave = "1"; canSaveDynamicFields = "1"; + advancedLightmapSupport = "0"; desc0 = "A blank room template that acts as a starting point."; - enabled = "1"; - levelName = "Blank Room Template"; + Enabled = "1"; + LevelName = "Blank Room Template"; }; new SkyBox(theSky) { Material = "BlankSkyMat"; @@ -54,7 +57,7 @@ new Scene(EditorTemplateLevel) { flareScale = "1"; attenuationRatio = "0 1 1"; shadowType = "PSSM"; - texSize = "1024"; + texSize = "2048"; overDarkFactor = "3000 1500 750 250"; shadowDistance = "200"; shadowSoftness = "0.25"; @@ -72,7 +75,7 @@ new Scene(EditorTemplateLevel) { canSaveDynamicFields = "1"; bias = "0.1"; Blur = "1"; - enabled = "1"; + Enabled = "1"; height = "1024"; lightBleedFactor = "0.8"; minVariance = "0"; @@ -88,11 +91,21 @@ new Scene(EditorTemplateLevel) { Material = "Grid_512_Grey"; canSave = "1"; canSaveDynamicFields = "1"; - enabled = "1"; + Enabled = "1"; position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; }; + new Skylight() { + Enabled = "1"; + ReflectionMode = "Baked Cubemap"; + position = "1.37009 -5.23561 46.5817"; + rotation = "1 0 0 0"; + canSave = "1"; + canSaveDynamicFields = "1"; + persistentId = "d5eb3afb-dced-11e9-a423-bb0e346e3870"; + reflectionPath = "tools/levels/BlankRoom/probes/"; + }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Irradiance.dds b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Irradiance.dds new file mode 100644 index 000000000..7d3caf071 Binary files /dev/null and b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Irradiance.dds differ diff --git a/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Prefilter.dds b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Prefilter.dds new file mode 100644 index 000000000..4696c0603 Binary files /dev/null and b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Prefilter.dds differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui index 8ea587cd6..ee92ab0c0 100644 --- a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui +++ b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui @@ -765,7 +765,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -816,7 +816,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.saveCompositeMap();"; @@ -835,7 +835,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -873,7 +873,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -897,7 +897,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -920,7 +920,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updateroughMap(1);"; @@ -945,7 +945,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -965,7 +965,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updateroughMap(1);"; @@ -989,7 +989,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updateroughMap(0);"; @@ -1009,7 +1009,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setRoughChan(0);"; @@ -1029,7 +1029,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setRoughChan(1);"; @@ -1049,7 +1049,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setRoughChan(2);"; @@ -1069,7 +1069,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setRoughChan(3);"; @@ -1109,7 +1109,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -1133,7 +1133,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -1156,7 +1156,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updateaoMap(1);"; @@ -1181,7 +1181,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -1201,7 +1201,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updateaoMap(1);"; @@ -1225,7 +1225,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updateaoMap(0);"; @@ -1245,7 +1245,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setAOChan(0);"; @@ -1265,7 +1265,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setAOChan(1);"; @@ -1285,7 +1285,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setAOChan(2);"; @@ -1305,7 +1305,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setAOChan(3);"; @@ -1345,7 +1345,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -1369,7 +1369,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -1392,7 +1392,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updatemetalMap(1);"; @@ -1417,7 +1417,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -1437,7 +1437,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updatemetalMap(1);"; @@ -1461,7 +1461,7 @@ minExtent = "8 2"; horizSizing = "left"; vertSizing = "bottom"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.updatemetalMap(0);"; @@ -1481,7 +1481,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setMetalChan(0);"; @@ -1501,7 +1501,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setMetalChan(1);"; @@ -1521,7 +1521,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setMetalChan(2);"; @@ -1541,7 +1541,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiRadioProfile"; + profile = "ToolsGuiRadioProfile"; visible = "1"; active = "1"; command = "MaterialEditorGui.setMetalChan(3);"; @@ -2333,7 +2333,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextRightProfile"; + Profile = "ToolsGuiTextRightProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "8 3"; @@ -2384,7 +2384,7 @@ internalName = "accuScaleTextEdit"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "64 0"; @@ -2415,7 +2415,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextRightProfile"; + Profile = "ToolsGuiTextRightProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "8 3"; @@ -2466,7 +2466,7 @@ internalName = "accuDirectionTextEdit"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "64 0"; @@ -2496,7 +2496,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextRightProfile"; + Profile = "ToolsGuiTextRightProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "8 3"; @@ -2547,7 +2547,7 @@ internalName = "accuStrengthTextEdit"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "64 0"; @@ -2577,7 +2577,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextRightProfile"; + Profile = "ToolsGuiTextRightProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "8 3"; @@ -2628,7 +2628,7 @@ internalName = "accuCoverageTextEdit"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "64 0"; @@ -2658,7 +2658,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextRightProfile"; + Profile = "ToolsGuiTextRightProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "8 3"; @@ -2709,7 +2709,7 @@ internalName = "accuSpecularTextEdit"; Enabled = "1"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "64 0"; diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui index e0bf56309..be5877706 100644 --- a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui +++ b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui @@ -85,7 +85,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiDefalutProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "89 3"; diff --git a/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui b/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui index 0ea3f0d02..d409a2e97 100644 --- a/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui +++ b/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui @@ -36,7 +36,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -59,7 +59,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -87,7 +87,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -111,7 +111,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -139,7 +139,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -163,7 +163,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -191,7 +191,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -211,7 +211,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -231,7 +231,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -251,7 +251,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "CreateNewNavMeshDlg.create();"; @@ -271,7 +271,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "Canvas.popDialog(CreateNewNavMeshDlg);"; diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.gui index 3f59069a3..19c063d7a 100644 --- a/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.gui +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.gui @@ -21,7 +21,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -43,7 +43,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "top"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -92,7 +92,7 @@ minExtent = "8 2"; horizSizing = "relative"; vertSizing = "relative"; - profile = "GuiListBoxProfile"; + profile = "ToolsGuiListBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui index de78d5ee7..2b96ce8af 100644 --- a/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui @@ -40,7 +40,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "1"; - Profile = "GuiWindowProfile"; + Profile = "ToolsGuiWindowProfile"; HorizSizing = "windowRelative"; VertSizing = "windowRelative"; Position = getWord($pref::Video::mode, 0) - 209 @@ -69,7 +69,7 @@ text = "Navigation"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -153,7 +153,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "1"; - Profile = "GuiWindowProfile"; + Profile = "ToolsGuiWindowProfile"; HorizSizing = "windowRelative"; VertSizing = "windowRelative"; Position = getWord($pref::Video::mode, 0) - 209 @@ -192,7 +192,7 @@ internalName = "ActionsBox"; new GuiTextCtrl(){ - Profile = "GuiDefaultProfile"; + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "5 0"; @@ -206,7 +206,7 @@ extent = "190 64"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -227,7 +227,7 @@ useMouseEvents = "0"; extent = "75 20"; minExtent = "8 2"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; variable = "NavEditorGui.backgroundBuild"; @@ -245,7 +245,7 @@ buttonType = "ToggleButton"; useMouseEvents = "0"; extent = "105 20"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; variable = "NavEditorGui.saveIntermediates"; @@ -264,7 +264,7 @@ useMouseEvents = "0"; extent = "150 20"; minExtent = "8 2"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; variable = "NavEditorGui.playSoundWhenDone"; @@ -282,7 +282,7 @@ extent = "190 64"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -298,7 +298,7 @@ extent = "190 64"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -307,7 +307,7 @@ command = "NavEditorGui.createCoverPoints();"; }; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -323,7 +323,7 @@ extent = "190 64"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -339,7 +339,7 @@ extent = "190 64"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -352,7 +352,7 @@ Extent = "190 18"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -362,7 +362,7 @@ }; new GuiButtonCtrl() { position = "100 0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -376,7 +376,7 @@ Extent = "190 18"; new GuiButtonCtrl() { - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -386,7 +386,7 @@ }; new GuiButtonCtrl() { position = "100 0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; buttonType = "PushButton"; HorizSizing = "right"; VertSizing = "bottom"; @@ -485,7 +485,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -505,7 +505,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -525,7 +525,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -545,7 +545,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -565,7 +565,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -585,7 +585,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -610,7 +610,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -628,7 +628,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -647,7 +647,7 @@ new GuiTextCtrl() { text = "Cover"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; extent = "180 20"; minExtent = "8 2"; visible = "1"; @@ -655,7 +655,7 @@ new GuiTextEditCtrl() { internalName = "CoverRadius"; text = "10"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; extent = "40 20"; minExtent = "8 2"; visible = "1"; @@ -665,7 +665,7 @@ new GuiTextEditCtrl() { internalName = "CoverPosition"; text = "LocalClientConnection.getControlObject().getPosition();"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; extent = "140 20"; minExtent = "8 2"; visible = "1"; @@ -674,7 +674,7 @@ }; new GuiTextCtrl() { text = "Follow"; - profile = "GuiTextProfile"; + profile = "ToolsuiTextProfile"; extent = "180 20"; minExtent = "8 2"; visible = "1"; @@ -682,7 +682,7 @@ new GuiTextEditCtrl() { internalName = "FollowRadius"; text = "1"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; extent = "40 20"; minExtent = "8 2"; visible = "1"; @@ -692,7 +692,7 @@ new GuiTextEditCtrl() { internalName = "FollowObject"; text = "LocalClientConnection.player"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; extent = "140 20"; minExtent = "8 2"; visible = "1"; @@ -701,7 +701,7 @@ }; new GuiTextCtrl() { text = "Movement"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; extent = "180 20"; minExtent = "8 2"; visible = "1"; @@ -716,7 +716,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -736,7 +736,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -756,7 +756,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -776,7 +776,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -796,7 +796,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; @@ -816,7 +816,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "0"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorSettingsTab.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorSettingsTab.gui index 2c3f6d22b..1cbe2a81e 100644 --- a/Templates/BaseGame/game/tools/navEditor/NavEditorSettingsTab.gui +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorSettingsTab.gui @@ -151,7 +151,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -178,7 +178,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiPopUpMenuProfile"; + profile = "ToolsGuiPopUpMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -222,7 +222,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -250,7 +250,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -345,7 +345,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -372,7 +372,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -438,7 +438,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -465,7 +465,7 @@ minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar.gui index 832324475..68e74d32e 100644 --- a/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar.gui +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar.gui @@ -30,7 +30,7 @@ minExtent = "8 8"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -66,7 +66,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; command = "NavEditorConsoleDlg.setVisible(!NavEditorConsoleDlg.isVisible());"; @@ -87,7 +87,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; variable = "$Nav::Editor::renderMesh"; @@ -108,7 +108,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; variable = "$Nav::Editor::renderPortals"; @@ -129,7 +129,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; variable = "$Nav::Editor::renderBVTree"; diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui index f6e34b7c1..141e577d1 100644 --- a/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui +++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui @@ -86,7 +86,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiDefalutProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "89 3"; diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui index 01171bf0b..bfa2e0513 100644 --- a/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui +++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui @@ -85,7 +85,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; - Profile = "GuiDefalutProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "89 3"; diff --git a/Templates/BaseGame/game/tools/settings.xml b/Templates/BaseGame/game/tools/settings.xml index 69b1e8ba6..9ce74e4ef 100644 --- a/Templates/BaseGame/game/tools/settings.xml +++ b/Templates/BaseGame/game/tools/settings.xml @@ -1,128 +1,105 @@ - - lowerHeight - - 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 - 90 - 1 - 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 - 0.1 - 1 - 50 - 10 - 100 - 0 + + 1 + 0.8 + 0 + 0 + 100 + 0.8 + 15 + + 0 + 255 255 255 20 + 500 + 10 10 10 + 0 + 0 - - 1 - 1 - 40 40 - ellipse - 40 40 - - - - 255 255 255 255 - 255 0 0 255 - 0 0 1 - 5 - 10 - 0 255 0 255 - - - 72 70 68 255 - 59 58 57 255 - 43 43 43 255 - 240 240 240 255 - 236 234 232 255 - 32 31 30 255 - 72 70 68 255 - 37 36 35 255 - 17 16 15 255 - 96 94 92 255 - 50 49 48 255 - 255 255 255 255 - 178 175 172 255 - 59 58 57 255 - 234 232 230 255 - 50 49 48 255 - 50 49 48 255 - 100 98 96 255 - AssetWork_Debug.exe screenCenter - 50 - 0 + WorldEditorInspectorPlugin 6 40 - WorldEditorInspectorPlugin + 0 + AssetWork_Debug.exe 1 - - 1 - 51 51 51 100 - 255 255 255 100 - 102 102 102 100 - 0 - - - 1 - 1 - 1 - 1 - 1 - - - tools/worldEditor/images/DefaultHandle - tools/worldEditor/images/LockedHandle - tools/worldEditor/images/SelectHandle - - - 100 100 100 255 - 255 255 0 255 - 0 0 255 255 - 255 255 0 255 - 255 255 255 255 - 0 255 0 255 - 255 0 0 255 - + 50 - 255 0 1 8 20 + 255 + + + 100 + 1 + 0 + 2 + 0 + 1 + 0 + + + 1 + 1 + 1 + 1 + 1 50 50 50 255 - 180 180 180 255 255 255 255 255 - 215 215 215 255 + 180 180 180 255 48 48 48 255 + 215 215 215 255 + + + 0 255 0 255 + 255 255 0 255 + 255 255 255 255 + 100 100 100 255 + 0 0 255 255 + 255 0 0 255 + 255 255 0 255 + + + tools/worldEditor/images/LockedHandle + tools/worldEditor/images/DefaultHandle + tools/worldEditor/images/SelectHandle + + + 0 + 102 102 102 100 + 255 255 255 100 + 51 51 51 100 + 1 - http://www.garagegames.com/products/torque-3d/documentation/user - ../../../Documentation/Torque 3D - Script Manual.chm ../../../Documentation/Official Documentation.html + ../../../Documentation/Torque 3D - Script Manual.chm + http://www.garagegames.com/products/torque-3d/documentation/user http://www.garagegames.com/products/torque-3d/forums - - 1 - 2 - 0 - 100 - 0 - 0 - 1 - 1024 768 tools/gui + + 0 + 0 + 0 + + + ../../../Documentation/Official Documentation.html + ../../../Documentation/Torque 3D - Script Manual.chm + http://www.garagegames.com/products/torque-3d/documentation/user + - 1 0 + 1 1 8 1 @@ -130,59 +107,118 @@ 1 2 - - 0 - 0 - 0 + + 0 1 1 - - ../../../Documentation/Official Documentation.html - ../../../Documentation/Torque 3D - Script Manual.chm - http://www.garagegames.com/products/torque-3d/documentation/user - Categorized - - 0 - - - - 100 - 15 - 0.8 - 0 - 0 - 0.8 - 1 - - 500 - 10 10 10 - 0 - 255 255 255 20 - 0 - 0 - - - - data/FPSGameplay/levels - - - 25 - - - 5 - - Grid_512_Orange + + lowerHeight + + 1 + 100 + 0.1 + 0 + 10 + 50 + 1 + 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 + 90 + 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 + + + 1 + 1 + 40 40 + ellipse + 40 40 + + + + 0 255 0 255 + 255 255 255 255 + DefaultDecalRoadMaterial + 10 + + + 0 + 0 0 0 100 + 135 + 45 + 40 40 + 0 + 1 + 1 + 1 + 0.1 + 255 255 255 255 + 1 + 1 + 1 + 180 180 180 255 + + + 255 0 0 255 + DefaultRoadMaterialOther + DefaultRoadMaterialTop + 10 + 0 0 1 + 0 255 0 255 + + + 255 0 0 255 + 0 255 0 255 + 255 255 255 255 + 10 + 5 + 0 0 1 + + + 72 70 68 255 + 96 94 92 255 + 100 98 96 255 + 50 49 48 255 + 32 31 30 255 + 72 70 68 255 + 50 49 48 255 + 37 36 35 255 + 59 58 57 255 + 236 234 232 255 + 50 49 48 255 + 255 255 255 255 + 255 255 255 255 + 43 43 43 255 + 17 16 15 255 + 234 232 230 255 + 59 58 57 255 + 178 175 172 255 + + + data/FPSGameplay/levels + + + 5 + + + 25 + + + + DefaultPlayerData AIPlayer + 1 + + + 1 diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui index ec1bf852e..804706089 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui @@ -607,7 +607,7 @@ new GuiTextEditCtrl(NodeTreeFilter) { position = "2 4"; extent = "175 18"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; horizSizing = "width"; vertSizing = "bottom"; class = "GuiTreeViewFilterText"; @@ -619,7 +619,7 @@ buttonType = "PushButton"; useMouseEvents = "0"; isContainer = "0"; - Profile = "GuiDefaultProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "left"; VertSizing = "bottom"; position = "180 5"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui index c00e31e4f..452c23bf6 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui @@ -68,7 +68,7 @@ new GuiTextCtrl() { canSaveDynamicFields = "0"; isContainer = "0"; - Profile = "GuiTextProfile"; + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "15 37"; @@ -90,7 +90,7 @@ new GuiTextCtrl() { canSaveDynamicFields = "0"; isContainer = "0"; - Profile = "GuiTextProfile"; + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "59 37"; @@ -112,7 +112,7 @@ new GuiTextCtrl() { canSaveDynamicFields = "0"; isContainer = "0"; - Profile = "GuiTextProfile"; + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "59 62"; @@ -134,7 +134,7 @@ new GuiTextEditCtrl() { canSaveDynamicFields = "0"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "97 35"; @@ -161,7 +161,7 @@ new GuiTextEditCtrl() { canSaveDynamicFields = "0"; isContainer = "0"; - Profile = "GuiTextEditProfile"; + Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "97 60"; @@ -188,7 +188,7 @@ new GuiTextCtrl() { canSaveDynamicFields = "0"; isContainer = "0"; - Profile = "GuiTextProfile"; + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "15 101"; @@ -210,7 +210,7 @@ new GuiTextCtrl() { canSaveDynamicFields = "0"; isContainer = "0"; - Profile = "GuiTextProfile"; + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "59 101"; @@ -321,7 +321,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -349,7 +349,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; variable = "$TPPCoverage"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui index 506c525b2..a18e3f4ba 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui @@ -18,7 +18,7 @@ internalName = "NavEditorSelectMode"; Enabled = "1"; isContainer = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; @@ -41,7 +41,7 @@ internalName = "NavEditorLinkMode"; Enabled = "1"; isContainer = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; @@ -64,7 +64,7 @@ internalName = "NavEditorCoverMode"; Enabled = "1"; isContainer = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; @@ -87,7 +87,7 @@ internalName = "NavEditorTileMode"; Enabled = "1"; isContainer = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; @@ -110,7 +110,7 @@ internalName = "NavEditorTestMode"; Enabled = "1"; isContainer = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui index 8f776c932..0ab8f2b1e 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui @@ -105,7 +105,7 @@ internalName = "smoothSlope"; Enabled = "1"; isContainer = "0"; - Profile = "GuiButtonProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "144 0"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui index c82e82450..405c13df5 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui @@ -520,7 +520,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/probeBakeDlg.gui b/Templates/BaseGame/game/tools/worldEditor/gui/probeBakeDlg.gui index 6f4c10d77..ae952c9b8 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/probeBakeDlg.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/probeBakeDlg.gui @@ -36,7 +36,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiWindowProfile"; + profile = "ToolsGuiWindowProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -59,7 +59,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -86,7 +86,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiPopUpMenuProfile"; + profile = "ToolsGuiPopUpMenuProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -109,7 +109,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -137,7 +137,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiTextEditProfile"; + profile = "ToolsGuiTextEditProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -156,7 +156,7 @@ minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; - profile = "GuiButtonProfile"; + profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/shadowViz.gui b/Templates/BaseGame/game/tools/worldEditor/gui/shadowViz.gui index 05c1a8926..e130850bd 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/shadowViz.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/shadowViz.gui @@ -23,7 +23,7 @@ internalName = "WindowCtrl"; canSaveDynamicFields = "0"; isContainer = "1"; - Profile = "GuiWindowProfile"; + Profile = "ToolsGuiWindowProfile"; HorizSizing = "right"; VertSizing = "bottom"; Position = "50 50"; diff --git a/Templates/BaseGame/game/tools/worldEditor/main.cs b/Templates/BaseGame/game/tools/worldEditor/main.cs index 6c87dfefe..1719bcccb 100644 --- a/Templates/BaseGame/game/tools/worldEditor/main.cs +++ b/Templates/BaseGame/game/tools/worldEditor/main.cs @@ -47,6 +47,7 @@ function initializeWorldEditor() exec("./gui/probeBakeDlg.gui" ); exec("tools/gui/cubemapEditor.gui" ); + exec("tools/gui/postFxEditor.gui" ); // Load Scripts. exec("./scripts/menus.ed.cs"); @@ -72,6 +73,8 @@ function initializeWorldEditor() exec("./scripts/visibility/shadowViz.cs"); exec("./scripts/visibility/probeViz.cs"); exec("./scripts/visibility/miscViz.cs"); + + exec("tools/gui/postFxEditor.cs" ); // Load Custom Editors loadDirectory(expandFilename("./scripts/editors")); diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs index e48eb8683..5850fa46c 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs @@ -190,7 +190,7 @@ function EditorGui::buildMenus(%this) item[14] = "Snap Options..." TAB "" TAB "ESnapOptions.ToggleVisibility();"; item[15] = "-"; item[16] = "Game Options..." TAB "" TAB "Canvas.pushDialog(optionsDlg);"; - item[17] = "PostEffect Manager" TAB "" TAB "Canvas.pushDialog(PostFXManager);"; + item[17] = "PostEffect Manager" TAB "" TAB "Canvas.pushDialog(PostFXEditor);"; }; %this.menuBar.insert(%editMenu); diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index f46febb1c..b6a8d5cef 100644 --- a/Tools/CMake/torque3d.cmake +++ b/Tools/CMake/torque3d.cmake @@ -135,11 +135,7 @@ mark_as_advanced(TORQUE_HIFI) option(TORQUE_EXTENDED_MOVE "Extended move support" OFF) mark_as_advanced(TORQUE_EXTENDED_MOVE) -if(WIN32) - option(TORQUE_SDL "Use SDL for window and input" ON) -else() - set(TORQUE_SDL ON) # we need sdl to work on Linux/Mac -endif() +set(TORQUE_SDL ON) # we need sdl to do our platform interop if(WIN32) option(TORQUE_OPENGL "Allow OpenGL render" ON) @@ -797,15 +793,32 @@ if(TORQUE_SDL) mark_as_advanced(CLOCK_GETTIME) mark_as_advanced(GCC_ATOMICS) mark_as_advanced(VIDEO_WAYLAND) + set(VIDEO_WAYLAND OFF) mark_as_advanced(VIDEO_COCOA) mark_as_advanced(VIDEO_DIRECTFB) mark_as_advanced(VIDEO_DUMMY) mark_as_advanced(VIDEO_MIR) mark_as_advanced(VIDEO_OPENGL) mark_as_advanced(VIDEO_OPENGLES) + set(VIDEO_OPENGLES OFF) mark_as_advanced(VIDEO_RPI) + set(VIDEO_RPI OFF) mark_as_advanced(VIDEO_VIVANTE) + set(VIDEO_VIVANTE OFF) mark_as_advanced(VIDEO_X11) + set(VIDEO_X11 OFF) + mark_as_advanced(VIDEO_VULKAN) + set(VIDEO_VULKAN OFF) + mark_as_advanced(VIDEO_KMSDRM) + set(VIDEO_KMSDRM OFF) + mark_as_advanced(WASAPI) + mark_as_advanced(SS3) + mark_as_advanced(SDL_TEST) + set(SDL_TEST OFF) + mark_as_advanced(SDL_SENSOR) + set(SDL_SENSOR OFF) + mark_as_advanced(BACKGROUNDING_SIGNAL) + mark_as_advanced(FOREGROUNDING_SIGNAL) endif() if(TORQUE_STATIC_CODE_ANALYSIS)