Moved unneeded modules to Templates/Modules

Added templated getObjectsByClass to Scene for easier engine-side polling of objects, including nested checks for subscenes
Proper init'ing of mGamemodeName in LevelAsset, as well as proper fieldType for mIsSubLevel
D3D11 added logic to handle scaling down of textures in cubemap arrays for lower texture resolution preferences
Added ability to collapse groups programmatically to GuiVariableInspector
Upped PSSM shadowmap max size to 4096
Caught GL deferred lighting/probes up to D3D11
Temporarily disabled forward lighting/probes on GL materials until conversion finished
Upped smMaxInstancingVerts to 2000 from 200 to support slightly more detailed meshes being instanced
Reordered project settings so they load ahead of core modules, so that core modules can actually use project settings
Established current preset file for PostFXManager to use for reverting
WIP logic for forcing probes to update as part of level lighting load step in loading process
Streamlined PostFXManager code, removing unnecessary/redundant files
Coverted HDR, Lightrays and SSAO and ExamplePostEffect to use new PostFX Manager/Editor paradigm
PostFX manager now enacts callbacks so that postFXs' can process their own settings as well as provide editor fields
Changed PostFX editor to work with new callbacks via using VariableInspector
Updated PostEffectAsset's template file so new PostFX's will now automatically register with the PostFXManager and have the needed new callbacks for integration
Made HDR on by default, removed enable field from editing
Made probe bake resolution a project setting
Updated many GL postFX shaders to have proper case for PostFx.glsl
Example module now loads ExampleGUI and ExamplePostEffect during init'ing
Removed unneeded autoload definitions from ExampleModule's module file
Fixed Graphics Adapter settings field to properly display as well as apply setting
Updated many referenced profiles in tools folder to use the Tools specific gui profiles to make theming more consistent
Fixed coloration of tools button bitmap to make theming more consistent
Updated a few theme settings for improved visibility with theme, particularly selected/highlighted text
Moved AssetBrowser field types to separated folder/files
Updated new module creation to properly utilize template file instead of overriding it with a programmatic script generation.
Removed unneded default autoload definitions from new modules
Added WIP for editing Module/Asset dependencies
Updated the PostEffectAsset to properly generate glsl and hlsl files from templates
Updated module editor window to display only necessary fields
Added WIP of TerrainAsset
Added shaderCache gitignore file so folder isn't lost
This commit is contained in:
Areloch 2019-09-29 06:44:43 -05:00
parent ff4c2d59fc
commit e7bf49e801
165 changed files with 2328 additions and 5095 deletions

View file

@ -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();
}

View file

@ -12,14 +12,4 @@
canSaveDynamicFields="true"
Extension="asset.taml"
Recurse="true" />
<AutoloadAssets
canSave="true"
canSaveDynamicFields="true"
AssetType="ComponentAsset"
Recurse="true" />
<AutoloadAssets
canSave="true"
canSaveDynamicFields="true"
AssetType="GUIAsset"
Recurse="true" />
</ModuleDefinition>

View file

@ -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 ---

View file

@ -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;