Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path

Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
This commit is contained in:
Areloch 2020-02-04 01:47:28 -06:00
parent 9735b1180d
commit f7b891442a
92 changed files with 1735 additions and 536 deletions

View file

@ -62,8 +62,13 @@ function GameConnection::onControlObjectChange(%this)
// Reset the current FOV to match the new object
// and turn off any current zoom.
resetCurrentFOV();
turnOffZoom();
$Player::CurrentFOV = ServerConnection.getControlCameraDefaultFov() / 2;
ServerConnection.zoomed = false;
setFov(ServerConnection.getControlCameraDefaultFov());
//resetCurrentFOV();
//turnOffZoom();
}
function GameConnection::onConnectionError(%this, %msg)

View file

@ -211,7 +211,7 @@ function serverCmdMissionStartPhase3Ack(%client, %seq)
// If we have a camera then set up some properties
if (isObject(%client.camera))
{
MissionCleanup.add( %this.camera );
MissionCleanup.add( %client.camera );
%client.camera.scopeToClient(%client);
%client.setControlObject(%client.camera);

View file

@ -27,11 +27,11 @@ singleton Material(OctahedronMat)
diffuseMap[0] = "core/gameObjects/images/camera";
translucent = "1";
translucentBlendOp = "LerpAlpha";
translucentBlendOp = "PreMul";
emissive = "0";
castShadows = "0";
colorMultiply[0] = "0 1 0 1";
diffuseColor[0] = "0 1 0 1";
};
//--- camera.dts MATERIALS BEGIN ---

View file

@ -40,7 +40,14 @@ function initLightingSystems(%manager)
exec( %file );
%file = findNextFile( %pattern );
}*/
%mode = ProjectSettings.value("General/LightingMode", "Deferred");
if(%mode $= "Deferred")
%manager = "Advanced Lighting";
else if(%mode $= "Forward")
%manager = "Basic Lighting";
// Try the perfered one first.
%success = setLightManager(%manager);

View file

@ -20,6 +20,9 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
$MotionBlurPostFX::samples = 15;
$MotionBlurPostFX::velocityMultiplier = 3000;
singleton ShaderData( PFX_MotionBlurShader )
{
DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; //we use the bare-bones postFxV.hlsl
@ -34,6 +37,11 @@ singleton ShaderData( PFX_MotionBlurShader )
pixVersion = 3.0;
};
function MotionBlurFX::onAdd( %this )
{
PostFXManager.registerPostEffect(%this);
}
singleton PostEffect(MotionBlurFX)
{
isEnabled = false;
@ -47,7 +55,17 @@ singleton PostEffect(MotionBlurFX)
target = "$backBuffer";
};
function MotionBlurFX::populatePostFXSettings(%this)
{
PostEffectEditorInspector.startGroup("General");
PostEffectEditorInspector.addField("isEnabled", "Enabled", "bool", "", MotionBlurFX.isEnabled, "", MotionBlurFX);
PostEffectEditorInspector.addField("$MotionBlurPostFX::velocityMultiplier", "Velocity Multiplier", "float", "", $MotionBlurPostFX::velocityMultiplier, "");
PostEffectEditorInspector.addField("$MotionBlurPostFX::samples", "Sample Count", "float", "", $MotionBlurPostFX::samples, "");
PostEffectEditorInspector.endGroup();
}
function MotionBlurFX::setShaderConsts(%this)
{
%this.setShaderConst( "$velocityMultiplier", 3000 );
%this.setShaderConst( "$velocityMultiplier", $MotionBlurPostFX::velocityMultiplier );
%this.setShaderConst( "$samples", $MotionBlurPostFX::samples );
}

View file

@ -413,6 +413,8 @@ function DOFPostEffect::onAdd( %this )
%this.maxRange = 500;
%this.nearSlope = -5.0;
%this.farSlope = 5.0;
PostFXManager.registerPostEffect(%this);
}
function DOFPostEffect::setLerpDist( %this, %d0, %d1, %d2 )
@ -495,6 +497,12 @@ DOFPostEffect.add( DOFFinalPFX );
//-----------------------------------------------------------------------------
// Scripts
//-----------------------------------------------------------------------------
function DOFPostEffect::populatePostFXSettings(%this)
{
PostEffectEditorInspector.startGroup("Depth of Field");
PostEffectEditorInspector.addField("isEnabled", "Enabled", "bool", "", DOFPostEffect.isEnabled, "", DOFPostEffect);
PostEffectEditorInspector.endGroup();
}
function DOFPostEffect::setShaderConsts( %this )
{

View file

@ -61,7 +61,7 @@ function vignettePostFX::setShaderConsts(%this)
function vignettePostFX::populatePostFXSettings(%this)
{
PostEffectEditorInspector.startGroup("Vignette - General");
PostEffectEditorInspector.startGroup("General");
PostEffectEditorInspector.addField("$PostFXManager::Settings::EnableVignette", "Enabled", "bool", "", $PostFXManager::PostFX::EnableVignette, "");
PostEffectEditorInspector.addField("$PostFXManager::Settings::VignettePostEffect::VMin", "Vignette Min", "float", "", $VignettePostEffect::VMin, "");
PostEffectEditorInspector.addField("$PostFXManager::Settings::VignettePostEffect::VMax", "Vignette Max", "float", "", $VignettePostEffect::VMax, "");

View file

@ -29,13 +29,13 @@ uniform float4x4 matWorldToScreen;
// Passed in from setShaderConsts()
uniform float velocityMultiplier;
uniform float samples;
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
TORQUE_UNIFORM_SAMPLER2D(deferredTex, 1);
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float samples = 5;
// First get the deferred texture for uv channel 0
float4 deferred = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 );

View file

@ -9,4 +9,7 @@
<Setting name="coreModulePath">core/</Setting>
</Group>
</Group>
<Group name="General">
<Setting name="LightingMode">Deferred</Setting>
</Group>
</ProjectSettings>

View file

@ -69,7 +69,7 @@ $pref::Video::autoDetect = 1;
// This is the path used by ShaderGen to cache procedural shaders. If left
// blank ShaderGen will only cache shaders to memory and not to disk.
$shaderGen::cachePath = "data/shaderCache";
$shaderGen::cachePath = "data/cache/shaderCache";
// Uncomment to disable ShaderGen, useful when debugging
//$ShaderGen::GenNewShaders = false;

View file

@ -319,6 +319,35 @@ function shareValueSafeDelay(%source, %dest, %delayMs)
schedule(%delayMs, 0, shareValueSafe, %source, %dest);
}
//------------------------------------------------------------------------------
function replaceInFile(%fileName, %fromWord, %toWord)
{
//Go through our scriptfile and replace the old namespace with the new
%editedFileContents = "";
%file = new FileObject();
if ( %file.openForRead( %fileName ) )
{
while ( !%file.isEOF() )
{
%line = %file.readLine();
%line = trim( %line );
%editedFileContents = %editedFileContents @ strreplace(%line, %fromWord, %toWord) @ "\n";
}
%file.close();
}
if(%editedFileContents !$= "")
{
%file.openForWrite(%fileName);
%file.writeline(%editedFileContents);
%file.close();
}
}
//------------------------------------------------------------------------------
// An Aggregate Control is a plain GuiControl that contains other controls,